Hi,
attached a small but ugly patch for pagination support.
so long
Henk
--- default.py_orig 2011-01-20 22:27:35.000000000 +0100
+++ default.py 2011-01-20 22:28:29.000000000 +0100
@@ -17,6 +17,32 @@
def show_sites(site):
content = getUrl(urllib.unquote(SITE + "/browse/" + site))
match = re.compile('<div class="thumbnail">(.+?)<div class="icons">',re.DOTALL).findall(content)
+ pagination = re.compile('Result pages:(.+?)</div>',re.DOTALL).findall(content)
+ pages = ""
+ for pg in pagination:
+ pages = re.compile('<a href="(.+?)">&',re.DOTALL).findall(pg)
+ if pages != "":
+ for p in pages:
+ content = getUrl(urllib.unquote(SITE + "/browse/" + site + "/" + p))
+ match = re.compile('<div class="thumbnail">(.+?)<div class="icons">',re.DOTALL).findall(content)
+ for m in match:
+ cat = re.compile('<img src="(.+?)".+?title="(.+?)".+?href="(.+?)"',re.DOTALL).findall(m)
+ for img,name,url in cat:
+ try:
+ if url.find(".html") != -1:
+ a = getUrl(urllib.unquote(SITE + "/browse/" + site + "/" + url))
+ newsite = re.compile('<b>Original File:</b> <a href="(.+?)"').findall(a)
+ liStyle=xbmcgui.ListItem(name, iconImage="default.png", thumbnailImage=img.replace(" ","%20"))
+ liStyle.setInfo( type="Video", infoLabels={ "Title": name })
+ addLinkItem(newsite[0].replace(" ","%20"), liStyle)
+ else:
+ addDirectoryItem(name,parameters={"url": urllib.unquote((site + "/" + url))},pic=img)
+ except:
+ 1
+ xbmcplugin.endOfDirectory(handle=handle, succeeded=True)
+ else:
+ content = getUrl(urllib.unquote(SITE + "/browse/" + site))
+ match = re.compile('<div class="thumbnail">(.+?)<div class="icons">',re.DOTALL).findall(content)
for m in match:
cat = re.compile('<img src="(.+?)".+?title="(.+?)".+?href="(.+?)"',re.DOTALL).findall(m)
for img,name,url in cat:
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons