2012-07-11, 16:04
hi again!
I am making some steady progress with my LiveLeak plugin, but I ran into a snag and I'm not sure how to have xbmc overcome it.
I wrote out this:
to deal with paging. The first one works (with the &page=foo) but the second doesn't. I checked my logs and they are ok, and I'm reading the right information from the url and parsing it right. The problem is that the page loads and then deals with the #item_page=foo. So what xbmc sees is the initial load and then nothing more. How can I make it wait for the javascript function to take place? Like maybe a wait(5) or something.
I'm not sure how else to deal with this issue...any push would be very helpful!
thanks!
Oh and the code is https://github.com/oneadvent/plugin.liveleak
I am making some steady progress with my LiveLeak plugin, but I ran into a snag and I'm not sure how to have xbmc overcome it.
I wrote out this:
Code:
if after[0] == 'b':
try:
appdg = after.split('&')[1]
before = after.split('&')[0]
appdg = int(appdg.split('=')[1]) + 1
newURL = before + "&page=" + str(appdg)
except:
newURL = after + "?i=1&page=2"
appdg = 2
elif after[0] == 'c':
try:
appdg = after.split('#')[1]
before = after.split('#')[0]
appdg = int(appdg.split('=')[1]) + 1
newURL = before + "#item_page=" + str(appdg)
except:
newURL = after + "#item_page=2"
appdg = 2
addDir("Page " + str(appdg), newURL, 1, "")
to deal with paging. The first one works (with the &page=foo) but the second doesn't. I checked my logs and they are ok, and I'm reading the right information from the url and parsing it right. The problem is that the page loads and then deals with the #item_page=foo. So what xbmc sees is the initial load and then nothing more. How can I make it wait for the javascript function to take place? Like maybe a wait(5) or something.
I'm not sure how else to deal with this issue...any push would be very helpful!
thanks!
Oh and the code is https://github.com/oneadvent/plugin.liveleak