def getFlashX(url): phpage = utils.getHtml(url, '') progress.update( 50, "", "Opening FlashX page", "" ) flashxurl = re.compile('<iframe src="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(phpage) flashxsrc = utils.getHtml2(flashxurl[0]) progress.update( 60, "", "Grabbing video file", "" ) flashxurl2 = re.compile('<a href="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(flashxsrc) flashxsrc2 = utils.getHtml2(flashxurl2[0]) progress.update( 70, "", "Grabbing video file", "" ) flashxjs = re.compile("<script type='text/javascript'>([^<]+)</sc", re.DOTALL | re.IGNORECASE).findall(flashxsrc2) flashxujs = beautify(flashxjs[0]) videourl = re.compile(r'\[{\s+file: "([^"]+)",', re.DOTALL | re.IGNORECASE).findall(flashxujs) progress.update( 80, "", "Returning video file", "" ) videourl = videourl[0] return videourl
def getFlashX(url): phpage = utils.getHtml(url, '') progress.update( 50, "", "Opening FlashX page", "" ) flashxurl = re.compile(r"//(?:www\.)?flashx\.tv/(?:embed-)?([0-9a-zA-Z]+)", re.DOTALL | re.IGNORECASE).findall(phpage) flashxurl = 'http://flashx.tv/embed-%s-670x400.html' % flashxurl[0] flashxsrc = utils.getHtml2(flashxurl) progress.update( 60, "", "Grabbing video file", "" ) flashxurl2 = re.compile('<a href="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(flashxsrc) flashxsrc2 = utils.getHtml2(flashxurl2[0]) progress.update( 70, "", "Grabbing video file", "" ) flashxjs = re.compile("<script type='text/javascript'>([^<]+)</sc", re.DOTALL | re.IGNORECASE).findall(flashxsrc2) flashxujs = beautify(flashxjs[0]) videourl = re.compile(r'\[{\s+file: "([^"]+)",', re.DOTALL | re.IGNORECASE).findall(flashxujs) progress.update( 80, "", "Returning video file", "" ) videourl = videourl[0] return videourl
def Playvid(url, name, download=None): listhtml = utils.getHtml2(url) listhtml = utils.unescapes(listhtml) match480 = re.search(r'[[]480p[]]=([^"]*?)&video_vars', listhtml) if match480: videourl = match480.group(1) else: match360 = re.search(r'[[]360p[]]=([^"]*?)&video_vars', listhtml) videourl = match360.group(1) if download == 1: utils.downloadVideo(videourl, name) else: iconimage = xbmc.getInfoImage("ListItem.Thumb") listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage) listitem.setInfo('video', {'Title': name, 'Genre': 'P**n'}) listitem.setProperty("IsPlayable","true") if int(sys.argv[1]) == -1: pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) pl.clear() pl.add(videourl, listitem) xbmc.Player().play(pl) else: listitem.setPath(str(videourl)) xbmcplugin.setResolvedUrl(utils.addon_handle, True, listitem) return
def BGPlayvid(url, name, download=None): videopage = utils.getHtml2(url) videopage = json.loads(videopage) if not videopage["240p"] == None: url = videopage["240p"].encode("utf8") if not videopage["480p"] == None: url = videopage["480p"].encode("utf8") if not videopage["720p"] == None: url = videopage["720p"].encode("utf8") url = url.replace("{DATA_MARKERS}","data=pc.XX") if not url.startswith("http:"): url = "http:" + url videourl = url if download == 1: utils.downloadVideo(videourl, name) else: iconimage = xbmc.getInfoImage("ListItem.Thumb") listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage) listitem.setInfo('video', {'Title': name, 'Genre': 'P**n'}) listitem.setProperty("IsPlayable","true") if int(sys.argv[1]) == -1: pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) pl.clear() pl.add(videourl, listitem) xbmc.Player().play(pl) else: listitem.setPath(str(videourl)) xbmcplugin.setResolvedUrl(utils.addon_handle, True, listitem)
def loadPerformers(self, url): print(url) self.cams_count = 0 self.clearLayout(self.layout) row = 0 col = 0 imagesPerRow = 4 try: listhtml = utils.getHtml2(url) except: return None match = re.compile("model_detail=(.*?)&.*?img src=(.*?)jpg.*?</div>", re.DOTALL | re.IGNORECASE).findall( listhtml) for name, img in match: url = name name = utils.cleantext(name) img = img + 'jpg' img = img.replace('90x90','300x300') lbl = ImageLabel(100, 100, img, url, name) self.layout.addWidget(lbl, row, col) QtGui.QApplication.processEvents() col += 1 if col % imagesPerRow == 0: row += 1 col = 0 if self.cams_count >= self.max_cams: break self.cams_count += 1 print("Operation completed...")
def BGPlayvid(url, name, download=None): videopage = utils.getHtml2(url) videopage = json.loads(videopage) if not videopage["240p"] == None: url = videopage["240p"].encode("utf8") if not videopage["480p"] == None: url = videopage["480p"].encode("utf8") if not videopage["720p"] == None: url = videopage["720p"].encode("utf8") url = url.replace("{DATA_MARKERS}", "data=pc.XX") if not url.startswith("http:"): url = "http:" + url videourl = url if download == 1: utils.downloadVideo(videourl, name) else: iconimage = xbmc.getInfoImage("ListItem.Thumb") listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage) listitem.setInfo('video', {'Title': name, 'Genre': 'P**n'}) listitem.setProperty("IsPlayable", "true") if int(sys.argv[1]) == -1: pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) pl.clear() pl.add(videourl, listitem) xbmc.Player().play(pl) else: listitem.setPath(str(videourl)) xbmcplugin.setResolvedUrl(utils.addon_handle, True, listitem)
def getFlashX(url): phpage = utils.getHtml(url, '') progress.update( 50, "", "Opening FlashX page", "" ) flashxurl = re.compile(r"//(?:www\.)?flashx\.tv/(?:embed-)?([0-9a-zA-Z]+)", re.DOTALL | re.IGNORECASE).findall(phpage) flashxurl = 'http://flashx.tv/embed-%s-670x400.html' % flashxurl[0] flashxsrc = utils.getHtml2(flashxurl) progress.update( 60, "", "Grabbing video file", "" ) flashxurl2 = re.compile('<a href="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(flashxsrc) flashxsrc2 = utils.getHtml2(flashxurl2[0]) progress.update( 70, "", "Grabbing video file", "" ) flashxjs = re.compile("<script type='text/javascript'>([^<]+)</sc", re.DOTALL | re.IGNORECASE).findall(flashxsrc2) try: flashxujs = unpack(flashxjs[0]) except: flashxujs = flashxjs[0] videourl = re.compile(r'\[{\s?file:\s?"([^"]+)",', re.DOTALL | re.IGNORECASE).findall(flashxujs) progress.update( 80, "", "Returning video file", "" ) videourl = videourl[0] return videourl
def List(url): listhtml = utils.getHtml2(url) match = re.compile(r"<i class='fa fa-desktop'></i> (.*?)</a></li>", re.DOTALL | re.IGNORECASE).findall(listhtml) for name in match: videopage = 'http://www.tpsoccer.net/p/' + name + '.html' name = 'Stream ' + name videopage = 'plugin://plugin.video.SportsDevil/?mode=1&item=catcher%3dstreams%26url=' + urllib.quote_plus(videopage) utils.addDownLink(name, videopage, 300, 'https://raw.githubusercontent.com/doki1/repo/master/NLView%20XML/tp.png', '', fanart='https://raw.githubusercontent.com/doki1/repo/master/NLView%20XML/fanart.jpg') xbmcplugin.endOfDirectory(utils.addon_handle)
def Playvid(url, name): listhtml = utils.getHtml2(url) videoid = re.compile('data-videoid="(.*?)"', re.DOTALL | re.IGNORECASE).findall(listhtml)[0] videoid = 'http://www.foxsports.nl/divadata/Output/VideoData/' + videoid + '.xml' videoxml = utils.getHtml2(videoid) videourl = re.compile(r'<uri>([^<]+m3u8)</uri>', re.DOTALL | re.IGNORECASE).findall(videoxml)[0] if videourl: iconimage = xbmc.getInfoImage("ListItem.Thumb") listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage) listitem.setInfo('video', {'Title': name, 'Genre': 'Music'}) listitem.setProperty("IsPlayable","true") if int(sys.argv[1]) == -1: pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) pl.clear() pl.add(videourl, listitem) xbmc.Player().play(pl) else: listitem.setPath(str(videourl)) xbmcplugin.setResolvedUrl(utils.addon_handle, True, listitem)
def BGCat(url): caturl = utils.getHtml2(url) catjson = json.loads(caturl) for tag in catjson["tags"]["popular"]: videolist = "http://beeg.com/api/v1/index/tag/0/pc?tag=" + tag.encode("utf8") name = tag.encode("utf8") name = name[:1].upper() + name[1:] utils.addDir(name, videolist, 81, '') xbmcplugin.endOfDirectory(utils.addon_handle)
def BGCat(url): bgversion = addon.getSetting('bgversion') caturl = utils.getHtml2(url) tags = re.compile(r'"nonpopular":\[(.*?)\]', re.DOTALL | re.IGNORECASE).findall(caturl)[0] tags = re.compile('"([^"]+)"', re.DOTALL | re.IGNORECASE).findall(tags) for tag in tags: videolist = "http://api2.beeg.com/api/v6/"+bgversion+"/index/tag/0/mobile?tag=" + tag.encode("utf8") name = tag.encode("utf8") name = name[:1].upper() + name[1:] utils.addDir(name, videolist, 81, '') xbmcplugin.endOfDirectory(utils.addon_handle)
def BGCat(url): caturl = utils.getHtml2(url) catjson = json.loads(caturl) for tag in catjson["tags"]["popular"]: videolist = "http://beeg.com/api/v1/index/tag/0/pc?tag=" + tag.encode( "utf8") name = tag.encode("utf8") name = name[:1].upper() + name[1:] utils.addDir(name, videolist, 81, '') xbmcplugin.endOfDirectory(utils.addon_handle)
def SearchList(url, page=None): listhtml = utils.getHtml2(url) match = re.compile(r'<article class="dcm-article">.*?<a href="(.*?)">.+?src="(.*?)".*?<a href=".*?">(.*?)</a>', re.DOTALL | re.IGNORECASE).findall(listhtml) for videopage, img, name in match: name = utils.cleantext(name) utils.addDownLink(name, videopage, 231, img, '', fanart='https://raw.githubusercontent.com/doki1/repo/master/NLView%20XML/fanart.jpg') try: nextp=re.compile(r'dcm-active">\d+<.*?href="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml)[0] next = "http://www.foxsports.nl/video/search/" + nextp.replace("&","&").replace(" ","%20") utils.addDir('Volgende Pagina', next, 229,'', '') except: pass xbmcplugin.endOfDirectory(utils.addon_handle)
def List(url, page=None): listhtml = utils.getHtml2(url) match = re.compile("""src='([^']+)' alt='([^<]+)'>.*?href="([^"]+)""", re.DOTALL | re.IGNORECASE).findall(listhtml) for img, name, videopage in match: name = utils.cleantext(name) videopage = "http://www.foxsports.nl" + videopage utils.addDownLink(name, videopage, 231, img, '', fanart='https://raw.githubusercontent.com/doki1/repo/master/NLView%20XML/fanart.jpg') if len(match) == 12: npage = page + 1 url = url.replace('/'+str(page)+'/','/'+str(npage)+'/') utils.addDir('Volgende Pagina ('+str(npage)+')', url, 228, '', npage) xbmcplugin.endOfDirectory(utils.addon_handle)
def List(url): listhtml = utils.getHtml2(url) match = re.compile(r'<img src="(.*?)" />.*?<h3>(.*?)</h3>.*?<a href="(.*?)"><span>Bekijk video</span></a>', re.DOTALL | re.IGNORECASE).findall(listhtml) for img, name, videopage in match: name = utils.cleantext(name) videopage = "http://xite.nl" + videopage utils.addDownLink(name, videopage, 222, img, '', fanart='https://raw.githubusercontent.com/doki1/repo/master/NLView%20XML/fanart.jpg') # if len(match) == 15: # npage = page + 1 # url = url.replace('/'+str(page)+'/','/'+str(npage)+'/') # utils.addDir('Volgende Pagina ('+str(npage)+')', url, 221, '', npage) xbmcplugin.endOfDirectory(utils.addon_handle)
def List(url): listhtml = utils.getHtml2(url) match = re.compile("model_detail=(.*?)&.*?img src=(.*?)jpg.*?</div>", re.DOTALL | re.IGNORECASE).findall(listhtml) for name, img in match: name = utils.cleantext(name) img = img + 'jpg' url = img[32:-17] if len(url) == 7: url = '10' + url else: url = '1' + url utils.addDownLink(name, url, 272, img, '') xbmcplugin.endOfDirectory(utils.addon_handle)
def List(url): listhtml = utils.getHtml2(url) match = re.compile('<li class="liProg">(.*?)</li>', re.DOTALL | re.IGNORECASE).findall(listhtml) for regel in match: if 'class="Day"' in regel: datum = re.compile('<p class="Day">([^<]+)</p>', re.DOTALL | re.IGNORECASE).findall(regel)[0] utils.addDir(datum, '', '', 'https://raw.githubusercontent.com/doki1/repo/master/NLView%20XML/s-f.png', Folder=False, fanart='https://raw.githubusercontent.com/doki1/repo/master/NLView%20XML/fanart.jpg') match = re.compile(r'class="date">(.*?) :</span>.*?<a href="(.*?)" title=".*?">.*?\n(.*?):', re.DOTALL | re.IGNORECASE).findall(regel) for tijd, videopage, name in match: name = '[COLOR lime]' + tijd + ': [/COLOR]' + utils.cleantext(name) videopage = 'plugin://plugin.video.SportsDevil/?mode=1&item=catcher%3dstreams%26url=' + urllib.quote_plus(videopage) utils.addDownLink(name, videopage, 300, 'https://raw.githubusercontent.com/doki1/repo/master/NLView%20XML/s-f.png', '', fanart='https://raw.githubusercontent.com/doki1/repo/master/NLView%20XML/fanart.jpg') xbmcplugin.endOfDirectory(utils.addon_handle)
def List(url): listhtml = utils.getHtml2(url) match = re.compile(r'<div class="vid ">.*?<header class="vidTop"><a href="(.*?)" target="_blank">(.*?)</a></header>.*?<img src="(.*?)" />', re.DOTALL | re.IGNORECASE).findall(listhtml) for videopage, name, img in match: videopage = "http://footyroom.com" + videopage utils.addDownLink(name, videopage, 226, img, '', fanart='https://raw.githubusercontent.com/doki1/repo/master/NLView%20XML/fanart.jpg') # try: # page = page + 1 # nextp=re.compile('href="([^"]+)"> Vol', re.DOTALL | re.IGNORECASE).findall(listhtml)[0] # next = "http://www.tvoranje.nl" + nextp.replace("&","&") # utils.addDir('Volgende Pagina', next, 224,'', page) # except: pass xbmcplugin.endOfDirectory(utils.addon_handle)
def List(url): listhtml = utils.getHtml2(url) print listhtml match = re.compile(r'<li>\s+<a href="([^"]+)".*?src="([^"]+)".*?alt="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml) for videopage, img, name in match: name = utils.cleantext(name) videopage = "https://chaturbate.com" + videopage utils.addDownLink(name, videopage, 222, img, '') try: nextp=re.compile('<a href="([^"]+)" class="next', re.DOTALL | re.IGNORECASE).findall(listhtml) next = "https://chaturbate.com" + nextp[0] utils.addDir('Next Page', next, 221,'') except: pass xbmcplugin.endOfDirectory(utils.addon_handle)
def List(url): listhtml = utils.getHtml2(url) match = re.compile(r'<div class="video-list-item">.*?<a href="(.*?)">.*?img src="(.*?)".*?<span class="title">(.*?)</span>.*?<small class="date">(.*?)</small>', re.DOTALL | re.IGNORECASE).findall(listhtml) for videopage, img, name, datum in match: name = utils.cleantext(name) + ' - ' + datum videopage = "http://www.ziggosporttotaal.nl" + videopage img = "http://www.ziggosporttotaal.nl" + img utils.addDownLink(name, videopage, 236, img, '', fanart='https://raw.githubusercontent.com/doki1/repo/master/NLView%20XML/fanart.jpg') try: nextp=re.compile('href="([^"]+)" class="nav-link icon-chevron-right"', re.DOTALL | re.IGNORECASE).findall(listhtml)[0] next = "http://www.ziggosporttotaal.nl" + nextp.replace("&","&") utils.addDir('Volgende Pagina', next, 233,'', '') except: pass xbmcplugin.endOfDirectory(utils.addon_handle)
def SearchList(url): listhtml = utils.getHtml2(url) match = re.compile(r'<li class="video-list-item">.*?<a href="(.*?)" class="imgLink">.*?srcset="(.*?) 2x.*?<span class="video-title">(.*?)</span>', re.DOTALL | re.IGNORECASE).findall(listhtml) for videopage, img, name in match: name = utils.cleantext(name) videopage = "http://www.ziggosporttotaal.nl" + videopage img = "http://www.ziggosporttotaal.nl" + img utils.addDownLink(name, videopage, 236, img, '', fanart='https://raw.githubusercontent.com/doki1/repo/master/NLView%20XML/fanart.jpg') try: nextp=re.compile(r'nav-link active">\d+<.*?href="([^"]+)" class="nav-link', re.DOTALL | re.IGNORECASE).findall(listhtml)[0] next = "http://www.ziggosporttotaal.nl/zoeken.html" + nextp.replace("&","&").replace(" ","+") utils.addDir('Volgende Pagina', next, 234,'', '') except: pass xbmcplugin.endOfDirectory(utils.addon_handle)
def List(url): listhtml = utils.getHtml2(url) listhtml = utils.unescapes(listhtml) match = re.compile('data-href.+?title="([^"]*?)"><span class="image"><a href="([^"]*?)" class="ajax"><img src="([^"]*?)"></a>.+?<span class="duration">([^"]*?)</span>', re.DOTALL | re.IGNORECASE).findall(listhtml) for name,url,thumb,duration in match: name = utils.cleantext(name) name = name + " [COLOR blue]" + duration + "[/COLOR]" url = main_url + url utils.addDownLink(name, url, 524, thumb, '') matchnext = re.findall('class="next ajax" href="([^"]*?)">Next</a>',listhtml) for url in matchnext: url = main_url + url utils.addDir('Next Page >', url, 523, '', '') xbmcplugin.endOfDirectory(utils.addon_handle)
def List(url): if utils.addon.getSetting("chaturbate") == "true": clean_database() listhtml = utils.getHtml2(url) match = re.compile(r'<li>\s+<a href="([^"]+)".*?src="([^"]+)".*?<div[^>]+>([^<]+)</div>.*?href[^>]+>([^<]+)<.*?age[^>]+>([^<]+)<', re.DOTALL | re.IGNORECASE).findall(listhtml) for videopage, img, status, name, age in match: name = utils.cleantext(name) name = "[" + status + "]" +name + " Age: [COLOR blue]" + age + "[/COLOR]" videopage = "https://chaturbate.com" + videopage utils.addDownLink(name, videopage, 222, img, '') try: nextp=re.compile('<a href="([^"]+)" class="next', re.DOTALL | re.IGNORECASE).findall(listhtml) next = "https://chaturbate.com" + nextp[0] utils.addDir('Next Page', next, 221,'') except: pass xbmcplugin.endOfDirectory(utils.addon_handle)
def BGList(url): listjson = utils.getHtml2(url) jsondata = json.loads(listjson) for videos in jsondata["videos"]: img = "http://img.beeg.com/236x177/" + videos["id"] + ".jpg" videopage = "http://beeg.com/api/v1/video/" + videos["id"] name = videos["title"].encode("utf8") utils.addDownLink(name, videopage, 82, img, '') try: page=re.compile('http://beeg.com/api/v1/index/[^/]+/([0-9]+)/pc', re.DOTALL | re.IGNORECASE).findall(url) if jsondata["pages"] > page: nextp = url.replace("/"+str(page)+"/", "/"+str(page+1)+"/") utils.addDir('Next Page', nextp,81,'') except: pass xbmcplugin.endOfDirectory(utils.addon_handle)
def List(url): listhtml = utils.getHtml2(url) match = re.compile( r'<li>\s+<a href="([^"]+)".*?src="([^"]+)".*?alt="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml) for videopage, img, name in match: name = utils.cleantext(name) videopage = "https://chaturbate.com" + videopage utils.addDownLink(name, videopage, 222, img, '') try: nextp = re.compile('<a href="([^"]+)" class="next', re.DOTALL | re.IGNORECASE).findall(listhtml) next = "https://chaturbate.com" + nextp[0] utils.addDir('Next Page', next, 221, '') except: pass xbmcplugin.endOfDirectory(utils.addon_handle)
def List(url): try: listhtml = utils.getHtml2(url) print(listhtml) except: return None match = re.compile("model_detail=(.*?)&.*?img src=(.*?)jpg.*?</div>", re.DOTALL | re.IGNORECASE).findall(listhtml) for name, img in match: url = name name = utils.cleantext(name) img = img + 'jpg' #img = img.replace('90x90', '300x300') print(url) print(name) print(img) u = myfreecam_start(url) print(u)
def Playvid(url, name): listhtml = utils.getHtml2(url) match = re.compile("<video.*?src='([^']+)'", re.DOTALL | re.IGNORECASE).findall(listhtml) if match: videourl = match[0] iconimage = xbmc.getInfoImage("ListItem.Thumb") listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage) listitem.setInfo('video', {'Title': name, 'Genre': 'P**n'}) listitem.setProperty("IsPlayable","true") if int(sys.argv[1]) == -1: pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) pl.clear() pl.add(videourl, listitem) xbmc.Player().play(pl) else: listitem.setPath(str(videourl)) xbmcplugin.setResolvedUrl(utils.addon_handle, True, listitem) else: utils.notify('Oh oh','Couldn\'t find a playable webcam link')
def List(url, page=None): if utils.addon.getSetting("chaturbate") == "true": clean_database() listhtml = utils.getHtml2(url) match = re.compile(r'<li>\s+<a href="([^"]+)".*?src="([^"]+)".*?<div[^>]+>([^<]+)</div>.*?href[^>]+>([^<]+)<.*?age[^>]+>([^<]+)<', re.DOTALL | re.IGNORECASE).findall(listhtml) for videopage, img, status, name, age in match: name = utils.cleantext(name) status = status.replace("\n","").strip() name = name + " [" + status + "] Age: [COLOR deeppink]" + age + "[/COLOR]" videopage = "https://chaturbate.com" + videopage utils.addDownLink(name, videopage, 222, img, '', noDownload=True) if len(match) == 90: try: page = page + 1 nextp=re.compile('<a href="([^"]+)" class="next', re.DOTALL | re.IGNORECASE).findall(listhtml) next = "https://chaturbate.com" + nextp[0] utils.addDir('Next Page ('+str(page)+')', next, 221,'', page) except: pass xbmcplugin.endOfDirectory(utils.addon_handle)
def BGList(url): listjson = utils.getHtml2(url) jsondata = json.loads(listjson) for videos in jsondata["videos"]: img = "http://img.beeg.com/236x177/" + videos["id"] + ".jpg" videopage = "http://beeg.com/api/v1/video/" + videos["id"] name = videos["title"].encode("utf8") utils.addDownLink(name, videopage, 82, img, '') try: page = re.compile('http://beeg.com/api/v1/index/[^/]+/([0-9]+)/pc', re.DOTALL | re.IGNORECASE).findall(url) if jsondata["pages"] > page: nextp = url.replace("/" + str(page) + "/", "/" + str(page + 1) + "/") utils.addDir('Next Page', nextp, 81, '') except: pass xbmcplugin.endOfDirectory(utils.addon_handle)
def BGList(url): listhtml = utils.getHtml2(url) Ids = re.compile(r"tumb_id =\[(.*?)\]", re.DOTALL | re.IGNORECASE).findall(listhtml) Names = re.compile(r"tumb_alt =\[(.*?)\]", re.DOTALL | re.IGNORECASE).findall(listhtml) SplitIds = re.split('\,+', Ids[0]) Names[0] = Names[0].lstrip('\'') Names[0] = Names[0].rstrip('\'') SplitNames = re.split('\'\,\'+', Names[0]) for id, name in zip(SplitIds, SplitNames): name = utils.cleantext(name) name = name.replace('\\\'','\'') videopage = 'http://www.beeg.com/' + id img = 'http://img.beeg.com/236x177/' + id + '.jpg' utils.addDownLink(name, videopage, 82, img, '') try: nextp=re.compile('<a href="([^"]+)" target="_self" id="paging_next"', re.DOTALL | re.IGNORECASE).findall(listhtml) nextp = 'http://www.beeg.com' + nextp[0] utils.addDir('Next Page', nextp,81,'') except: pass xbmcplugin.endOfDirectory(utils.addon_handle)