def LISTCONTENT(murl, thumb): setCookie(murl) response = net().http_GET(murl) link = response.content link = cleanHex(link) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace(' ', '') if 'http://hostaccess.org/7-SFE-SZE-HOSTACCESS/media/vod.php' == murl: response = net().http_GET( 'http://sportsaccess.se/forum/misc.php?page=Replays') link = response.content link = cleanHex(link) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace(' ', '') match = re.compile( '<a href="([^"]+)"><img src="([^"]+)" width=".+?alt="([^"]+)"></a>' ).findall(link) for url, thumb, name in match: if 'http' not in thumb: thumb = 'http://sportsaccess.se/forum/' + thumb main.addDir(name, url, 411, thumb) else: match = re.compile('<a href="(.+?)">(.+?)</a>').findall(link) for url, name in match: if 'GO BACK' not in name and '1 Year Subscriptions' not in name and 'Live Broadcasts' not in name and '<--- Return To On Demand Guide' not in name: name = re.sub('(?sim)<[^>]*?>', '', name) if 'http' not in url: url = 'http://sportsaccess.se' + url main.addPlayL(name, url, 413, thumb, '', '', '', '', '')
def TRACKSHOW(track): from t0mm0.common.net import Net as net referer = re.findall('<xo>(.+?)</xo>', track)[0] showID = re.findall('name="tv_show_id" type="hidden" value="(.+?)"', track)[0] auth = re.findall('name="authenticity_token" type="hidden" value="(.+?)"', track)[0] cookie = open(cookie_file).read() user = re.findall('SrLoggedIn=(.+?);', cookie)[0] method = re.findall('SrLoginMethod=(.+?);', cookie)[0] token = re.findall('remember_user_token="(.+?)";', cookie)[0] session = re.findall('sidereel_session=(.+?);', cookie)[0] header = { 'Accept': 'application/json, text/javascript, */*; q=0.01', 'Accept-Encoding': 'gzip,deflate,sdch', 'Accept-Language': 'en-US,en;q=0.8', 'Referer': referer, 'Cookie': 'cookie-policy=true; __qca=P0-573233217-1389196433989; sign-up-promo=true; SrLoggedIn=' + user + '; SrLoginMethod=' + method + '; remember_user_token=' + token + '; _sidereel_session=' + session + '; __utma=108050432.541580819.1389196431.1389196431.1389196431.1; __utmb=108050432.55.9.1389211544772; __utmc=108050432; __utmz=108050432.1389196431.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided)' } post_data = {'authenticity_token': auth, 'tv_show_id': showID} net().http_POST('http://www.sidereel.com/tracked_tv_show.js', post_data, header) xbmcgui.Window(10000).setProperty('Refresh_Sidreel', '1') xbmcgui.Window(10000).setProperty('MASH_SR_REFRESH', 'True') xbmc.executebuiltin("XBMC.Container.Refresh")
def get_link(murl): setCookie(murl) response = net().http_GET(murl) link = response.content link = cleanHex(link) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace(' ', '') m3u8 = re.findall('<a href="([^"]+?.m3u8)">', link) iframe = re.findall( '<iframe src="(http://admin.livestreamingcdn.com[^"]+?)"', link) if m3u8: return m3u8[0] elif iframe: response = net().http_GET(iframe[0]) link = response.content link = cleanHex(link) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace(' ', '') vlink = re.findall('file: "([^"]+?.m3u8)"', link) return vlink[0] else: swf = re.findall("src='([^<]+).swf'", link)[0] file = re.findall("file=(.+?)&", link)[0] file = file.replace('.flv', '') streamer = re.findall("streamer=(.+?)&", link)[0] if '.mp4' in file and 'vod' in streamer: file = 'mp4:' + file return streamer + ' playpath=' + file + ' swfUrl=' + swf + '.swf pageUrl=' + murl else: return streamer + ' playpath=' + file + ' swfUrl=' + swf + '.swf pageUrl=' + murl + ' live=true timeout=20'
def get_link(murl): setCookie(murl) response = net().http_GET(murl) link = response.content link = cleanHex(link) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace(' ','') m3u8=re.findall('<a href="([^"]+?.m3u8)">',link) iframe=re.findall('<iframe src="(http://admin.livestreamingcdn.com[^"]+?)"',link) if m3u8: return m3u8[0] elif iframe: response = net().http_GET(iframe[0]) link = response.content link = cleanHex(link) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace(' ','') vlink=re.findall('file: "([^"]+?.m3u8)"',link) return vlink[0] else: swf=re.findall("src='([^<]+).swf'",link)[0] file=re.findall("file=(.+?)&",link)[0] file=file.replace('.flv','') streamer=re.findall("streamer=(.+?)&",link)[0] if '.mp4' in file and 'vod' in streamer: file='mp4:'+file return streamer+' playpath='+file+' swfUrl='+swf+'.swf pageUrl='+murl else: return streamer+' playpath='+file+' swfUrl='+swf+'.swf pageUrl='+murl+' live=true timeout=20'
def LISTCONTENT(murl,thumb): setCookie(murl) response = net().http_GET(murl) link = response.content link = cleanHex(link) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace(' ','') if 'http://hostaccess.org/7-SFE-SZE-HOSTACCESS/media/vod.php' == murl: response = net().http_GET('http://sportsaccess.se/forum/misc.php?page=Replays') link = response.content link = cleanHex(link) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace(' ','') match=re.compile('<a href="([^"]+)"><img src="([^"]+)" width=".+?alt="([^"]+)"></a>').findall(link) for url,thumb,name in match: if 'http' not in thumb: thumb='http://sportsaccess.se/forum/'+thumb main.addDir(name,url,411,thumb) else: match=re.compile('<a href="(.+?)">(.+?)</a>').findall(link) for url,name in match: if 'GO BACK' not in name and '1 Year Subscriptions' not in name and 'Live Broadcasts' not in name and '<--- Return To On Demand Guide' not in name: name = re.sub('(?sim)<[^>]*?>','',name) if 'http' not in url: url='http://sportsaccess.se'+url main.addPlayL(name,url,413,thumb,'','','','','')
def LISTSP5(murl): nrDomain = GetNewUrl(); murl=nrDomain+'/latest.php' lurl=nrDomain+'/login2.php' net().http_POST(lurl,{'email':user,'password':passw}) response = net().http_GET(murl) link = response.content if response.get_url() != murl: xbmc.executebuiltin("XBMC.Notification(Sorry!,Email or Password Incorrect,10000,"+smalllogo+")") main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'',art+'/link.png') match=re.compile("<br>(.+?) - <a[^>]+?href='(.+?)'>(.+?)</a>").findall(link) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait until Movie list is cached.') totalLinks = len(match) loadedLinks = 0 remaining_display = 'Movies loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].' dialogWait.update(0, '[B]Will load instantly from now on[/B]',remaining_display) id = 1; for year,url,name in match: name=main.unescapes(name) if(year=='0'): year='0000' url=nrDomain+url main.addDown3(name+' [COLOR red]('+year+')[/COLOR]',url,58,'','',id) id += 1 loadedLinks = loadedLinks + 1 percent = (loadedLinks * 100)/totalLinks remaining_display = 'Movies loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].' dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display) if (dialogWait.iscanceled()): return False dialogWait.close() del dialogWait main.GA("HD","Starplay") main.VIEWS()
def Index(): deletecachefiles() announce() setCookie('http://rarehost.net/amember/member') response = net().http_GET('http://rarehost.net/amember/member') if not 'Logged in as' in response.content: dialog = xbmcgui.Dialog() dialog.ok('HQZone', 'Login Error','An error ocurred logging in. Please check your details','Ensure your account is active on http://hqzone.tv') quit() link = response.content link = cleanHex(link) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace(' ','') addDir('[COLOR blue][B]--- View Todays Overview ---[/B][/COLOR]','http://hqzone.tv/forums/forum.php',7,icon,fanart) addDir('[COLOR blue][B]--- View This Weeks Schedule ---[/B][/COLOR]','http://hqzone.tv/forums/calendar.php?c=1&do=displayweek',6,icon,fanart) addLink(' ','url',5,icon,fanart) vip=re.compile('<li><a href="(.+?)">VIP Streams</a>').findall(link) if len(vip)>0: vip=vip[0] addDir('[COLOR gold]VIP[/COLOR] HQ Streaming Channels','http://rarehost.net/amember/vip/vip.php',2,icon,fanart) addDir('[COLOR gold]VIP[/COLOR] HQ Video on Demand','url',4,icon,fanart) addLink(' ','url',5,icon,fanart) addLink('How to Subscribe','url',302,icon,fanart) addLink('[COLOR blue]Twitter[/COLOR] Feed','url',100,icon,fanart) addLink('HQZone Account Status','url',200,icon,fanart) addDir('HQ Zone Support','url',300,icon,fanart) addLink(' ','url',5,icon,fanart) response = net().http_GET('http://pastebin.com/raw.php?i=Jp76gEmp') link = response.content ticker=re.compile('<ticker>(.+?)</ticker>').findall(link)[0] addLink('[COLOR red][I]'+ ticker +'[/I][/COLOR]','url','mode',icon,fanart) xbmc.executebuiltin('Container.SetViewMode(50)')
def setCookie(): from t0mm0.common.net import Net as net cookie_file = os.path.join(os.path.join(main.datapath, 'Cookies'), 'directdownload.cookies') cookieExpired = False if os.path.exists(cookie_file): try: cookie = open(cookie_file).read() expire = re.search('expires="(.*?)"', cookie, re.I) if expire: expire = str(expire.group(1)) import time if time.time() > time.mktime( time.strptime(expire, '%Y-%m-%d %H:%M:%SZ')): cookieExpired = True except: cookieExpired = True if not os.path.exists(cookie_file) or cookieExpired: log_in = net().http_POST('http://directdownload.tv', { 'username': user, 'password': passw, 'Login': '******' }).content if "alert('Invalid login or password.')" in log_in: xbmcplugin.endOfDirectory(int(sys.argv[1]), False, False) xbmc.executebuiltin( "XBMC.Notification(Sorry!,Username or Password Incorrect,10000," + smalllogo + ")") return net().save_cookies(cookie_file) else: net().set_cookies(cookie_file)
def find_noobroom_video_url(page_url): import urllib2 headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36'} setCookie(re.sub('http://([^/]+?)/.*','\\1',page_url)) html = net().http_GET(page_url).content media_id = re.compile('"file": "(.+?)"').findall(html)[0] fork_url = re.compile('"streamer": "(.+?)"').findall(html)[0] + '&start=0&file=' + media_id class MyHTTPRedirectHandler(urllib2.HTTPRedirectHandler): def http_error_302(self, req, fp, code, msg, headers): #print headers self.video_url = headers['Location'] #print self.video_url return urllib2.HTTPRedirectHandler.http_error_302(self, req, fp, code, msg, headers) http_error_301 = http_error_303 = http_error_307 = http_error_302 myhr = MyHTTPRedirectHandler() opener = urllib2.build_opener( urllib2.HTTPCookieProcessor(net()._cj), urllib2.HTTPBasicAuthHandler(), myhr) urllib2.install_opener(opener) req = urllib2.Request(fork_url) for k, v in headers.items(): req.add_header(k, v) try: response = urllib2.urlopen(req) except: pass return myhr.video_url
def SEARCHRlsmix(murl): log_in = net().http_POST('http://directdownload.tv',{'username':user,'password':passw,'Login':'******'}).content seapath=os.path.join(main.datapath,'Search') SeaFile=os.path.join(seapath,'SearchHistoryTv') try: os.makedirs(seapath) except: pass if murl == 'rlsmix': keyb = xbmc.Keyboard('', 'Search For Shows or Movies') keyb.doModal() if (keyb.isConfirmed()): search = keyb.getText() encode=urllib.quote(search) surl='http://directdownload.tv/index/search/keyword/'+encode+'/qualities/pdtv,dsr,realhd,dvdrip,webdl,webdl1080p/from/0/search' if not os.path.exists(SeaFile) and encode != '': open(SeaFile,'w').write('search="%s",'%encode) else: if encode != '': open(SeaFile,'a').write('search="%s",'%encode) searchis=re.compile('search="(.+?)",').findall(open(SeaFile,'r').read()) for seahis in reversed(searchis): continue if len(searchis)>=10: searchis.remove(searchis[0]) os.remove(SeaFile) for seahis in searchis: try: open(SeaFile,'a').write('search="%s",'%seahis) except: pass else: encode = murl surl='http://directdownload.tv/index/search/keyword/'+encode+'/qualities/pdtv,dsr,realhd,dvdrip,webdl,webdl1080p/from/0/search' link = net().http_GET(surl).content urllist=main.unescapes(link) match=re.compile('{"release":"(.+?)","when":.+?,"size":".+?","links":(.+?),"idtvs".+?}').findall(urllist) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait until Show list is cached.') totalLinks = len(match) loadedLinks = 0 remaining_display = 'Episodes loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].' dialogWait.update(0,'[B]Will load instantly from now on[/B]',remaining_display) for name,url in match: name=name.replace('.',' ') url=url.replace('\/','/') main.addDirTE(name,url,62,'','','','','','') loadedLinks = loadedLinks + 1 percent = (loadedLinks * 100)/totalLinks remaining_display = 'Episodes loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].' dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display) if (dialogWait.iscanceled()): return False dialogWait.close() del dialogWait main.GA("Movie1k","Search")
def setCookie(srDomain): cookieExpired = False if os.path.exists(cookie_file): try: cookie = open(cookie_file).read() expire = re.search('expires="(.*?)"',cookie, re.I) if expire: expire = str(expire.group(1)) import time if time.time() > time.mktime(time.strptime(expire, '%Y-%m-%d %H:%M:%SZ')): cookieExpired = True except: cookieExpired = True if not os.path.exists(cookie_file) or cookieExpired: html = net().http_GET(srDomain).content r = re.findall(r'<input type="hidden" name="(.+?)" value="(.+?)" />', html, re.I) post_data = {} post_data['amember_login'] = user post_data['amember_pass'] = passw for name, value in r: post_data[name] = value print post_data net().http_GET('https://hostaccess.org/amember/protect/new-rewrite?f=2&url=/member1/&host=hostaccess.org&ssl=off') net().http_POST('https://hostaccess.org/amember/protect/new-rewrite?f=2&url=/member1/&host=hostaccess.org&ssl=off',post_data) net().save_cookies(cookie_file) else: net().set_cookies(cookie_file)
def setCookie(srDomain): cookieExpired = False if os.path.exists(cookie_file): try: cookie = open(cookie_file).read() expire = re.search('expires="(.*?)"', cookie, re.I) if expire: expire = str(expire.group(1)) import time if time.time() > time.mktime( time.strptime(expire, '%Y-%m-%d %H:%M:%SZ')): cookieExpired = True except: cookieExpired = True if not os.path.exists(cookie_file) or cookieExpired: html = net().http_GET(srDomain).content r = re.findall(r'<input type="hidden" name="(.+?)" value="(.+?)" />', html, re.I) post_data = {} post_data['amember_login'] = user post_data['amember_pass'] = passw for name, value in r: post_data[name] = value net().http_GET('http://hostaccess.org/amember/login') net().http_POST('http://hostaccess.org/amember/login', post_data) net().save_cookies(cookie_file) else: net().set_cookies(cookie_file)
def ARTIST_SONG_INDEX(url,name): link=net().http_GET(url).content match = re.compile('<a href="(.+?)">.+? in alphabetical order</a></b><br>').findall(link) url1 = 'http://www.lyricsmania.com'+match[0] link1=net().http_GET(url1).content match1 = re.compile('<a href=".+?_lyrics_(.+?).html" title="(.+?) lyrics">').findall(link1) fanart = art+'Main/Fanart_A.jpg' for url, name, in match1: name = str(name).replace("À","A").replace('é','e').replace('ê','e').replace('è','e').replace("à","A") addDir(name.encode('ascii','ignore'),url,6,iconimage,fanart,1) setView('tvshow', 'DEFAULT')
def resolve_veehd(url): name = "veeHD" cookie_file = os.path.join(datapath, "%s.cookies" % name) user_agent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3" from random import choice userName = ["mashup1", "mashup3", "mashup4", "mashup5", "mashup6", "mashup7"] try: loginurl = "http://veehd.com/login" ref = "http://veehd.com/" submit = "Login" terms = "on" remember_me = "on" data = { "ref": ref, "uname": choice(userName), "pword": "xbmcisk00l", "submit": submit, "terms": terms, "remember_me": remember_me, } html = net(user_agent).http_POST(loginurl, data).content net().save_cookies(cookie_file) headers = {} headers = { "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13+ (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2" } net().set_cookies(cookie_file) print "Mash Up VeeHD - Requesting GET URL: %s" % url html = net().http_GET(url, headers).content fragment = re.findall('playeriframe".+?attr.+?src : "(.+?)"', html) frag = "http://%s%s" % ("veehd.com", fragment[1]) net().set_cookies(cookie_file) html = net().http_GET(frag, headers).content r = re.search('"video/divx" src="(.+?)"', html) if r: stream_url = r.group(1) if not r: message = name + "- 1st attempt at finding the stream_url failed probably an Mp4, finding Mp4" addon.log_debug(message) a = re.search('"url":"(.+?)"', html) if a: r = urllib.unquote(a.group(1)) if r: stream_url = r else: xbmc.executebuiltin("XBMC.Notification(File Not Found,VeeHD,2000)") return False if not a: a = re.findall('href="(.+?)">', html) stream_url = a[1] return stream_url except Exception, e: print "**** Mash Up VeeHD Error occured: %s" % e # addon.show_small_popup('[B][COLOR green]Mash Up: VeeHD Resolver[/COLOR][/B]','Error, Check XBMC.log for Details',5000, error_logo) raise ResolverError(str(e), "VeeHD")
def setCookie(srDomain): from t0mm0.common.net import Net as net cookieExpired = False if os.path.exists(cookie_file): try: cookie = open(cookie_file).read() expire = re.search('expires="(.*?)"', cookie, re.I) if expire: expire = str(expire.group(1)) import time if time.time() > time.mktime( time.strptime(expire, '%Y-%m-%d %H:%M:%SZ')): cookieExpired = True except: cookieExpired = True loggedin = re.search('SrLoggedIn', cookie, re.I) if not os.path.exists(cookie_file) or cookieExpired or (not loggedin and user != '' and passw != ''): link = main.OPENURL(srDomain + '/sign_in') match = re.findall('<meta content="([^<]+)" name="csrf-token" />', link, re.DOTALL) token = match[0] net().http_GET(srDomain + '/sign_in') net().http_POST( srDomain + '/sign_in', { 'authenticity_token': token, 'user[email]': user, 'user[password]': passw }) net().save_cookies(cookie_file) else: net().set_cookies(cookie_file)
def resolve_videto(url, referer): user_agent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' from resources.libs import jsunpack from t0mm0.common.addon import Addon addon = Addon('plugin.video.movie25', sys.argv) try: from t0mm0.common.net import Net as net html = net(user_agent).http_GET(url).content addon.log_error('Mash Up: Resolve Vidto - Requesting GET URL: ' + url) r = re.findall(r'<font class="err">File was removed</font>', html, re.I) if r: addon.log_error('Mash Up: Resolve Vidto - File Was Removed') xbmc.executebuiltin("XBMC.Notification(File Not Found,Vidto,2000)") return False if not r: r = re.findall( r'(eval\(function\(p,a,c,k,e,d\)\{while.+?flvplayer.+?)</script>', html, re.M | re.DOTALL) if r: unpacked = jsunpack.unpack( r[0] ) #this is where it will error, not sure if resources,libs added to os path r = re.findall(r'label:"\d+p",file:"(.+?)"}', unpacked) if not r: r = re.findall('type="hidden" name="(.+?)" value="(.+?)">', html) post_data = {} for name, value in r: post_data[name] = value post_data['usr_login'] = '' post_data['referer'] = referer addon.show_countdown(7, 'Please Wait', 'Resolving') headers = {'Referer': referer} html = net(user_agent).http_POST(url, post_data, headers).content r = re.findall( r'(eval\(function\(p,a,c,k,e,d\)\{while.+?flvplayer.+?)</script>', html, re.M | re.DOTALL) if r: unpacked = jsunpack.unpack(r[0]) r = re.findall(r'label:"\d+p",file:"(.+?)"}', unpacked) if not r: r = re.findall(r"var file_link = '(.+?)';", html) return r[0] except Exception, e: print 'Mash Up: Resolve Vidto Error - ' + str(e) addon.show_small_popup( '[B][COLOR green]Mash Up: Vidto Resolver[/COLOR][/B]', 'Error, Check XBMC.log for Details', 5000, elogo)
def SEASONS(url,name): try: title = re.compile(r'www.movie2k.to-(.+?)-watch').findall(url.replace('/','-'))[0] html = net().http_GET(url,{'Cookie':'onlylanguage=en'}).content seasons = re.compile('<OPTION value="[^a-zA-Z]+">Season (.+?)</OPTION>').findall(html.replace(' selected','').replace('\t','')) cover = grab.get_seasons(name.replace('[B][COLOR green]','').replace('[/COLOR][/B]','').replace('*SUBTITLED*',''), None, seasons, overlay=6) covers= re.compile("'cover_url': '(.+?)',").findall(str(cover)) for i in range(0,len(seasons)): addDir("%s ~ Season %s"%(name,seasons[i].replace('\t','').encode('ascii','ignore').strip()),url,6,covers[i],None,int(len(seasons))) except: html = net().http_GET(url,{'Cookie':'onlylanguage=en'}).content redirect = re.compile('<TD id="tdmovies" width="538"><a href="(.+?)">',re.DOTALL).findall(html.replace('\t','')) link="http://www.movie2k.to/%s"%re.compile('<TD id="tdmovies" width="538"><a href="(.+?)">',re.DOTALL).findall(net().http_GET("http://www.movie2k.to/%s"%redirect[0],{'Cookie':'onlylanguage=en'}).content)[0] SEASONS(link,name)
def vodlisting(name,url): setCookie('http://rarehost.net/amember/member') response = net().http_GET(url) link = response.content link = cleanHex(link) match=re.compile("playlist: '(.+?)'").findall(link)[0] if 'Weeklies' in name:url='http://rarehost.net/amember/free/'+match else:url = 'http://rarehost.net/amember/vip/'+match setCookie('http://rarehost.net/amember/member') response = net().http_GET(url) link = response.content link = cleanHex(link) match=re.compile('<title>(.+?)</title>.+?source file="(.+?)"',re.DOTALL).findall(link) for name,url in match: addLink(name,url,53,icon,fanart)
def setCookie(srDomain): html = net().http_GET(srDomain).content r = re.findall(r'<input type="hidden" name="(.+?)" value="(.+?)" />', html, re.I) post_data = {} post_data["amember_login"] = user post_data["amember_pass"] = passw for name, value in r: post_data[name] = value net().http_GET("http://straighthost.com/billing/member") net().http_POST("http://straighthost.com/billing/member", post_data) net().save_cookies(cookie_file) net().set_cookies(cookie_file)
def setCookie(srDomain): html = net().http_GET(srDomain).content r = re.findall(r'<input type="hidden" name="(.+?)" value="(.+?)" />', html, re.I) post_data = {} post_data['amember_login'] = user post_data['amember_pass'] = passw for name, value in r: post_data[name] = value net().http_GET('http://rarehost.net/amember/member') net().http_POST('http://rarehost.net/amember/member',post_data) net().save_cookies(cookie_file) net().set_cookies(cookie_file)
def IiI ( srDomain ) : I11 = net ( ) . http_GET ( srDomain ) . content Oo0o0000o0o0 = re . findall ( r'<input type="hidden" name="(.+?)" value="(.+?)" />' , I11 , re . I ) oOo0oooo00o = { } oOo0oooo00o [ 'amember_login' ] = II1 oOo0oooo00o [ 'amember_pass' ] = O00ooooo00 for i1i1II , oO0o0o0ooO0oO in Oo0o0000o0o0 : oOo0oooo00o [ i1i1II ] = oO0o0o0ooO0oO net ( ) . http_GET ( base64 . b64decode ( ooOo ) ) net ( ) . http_POST ( base64 . b64decode ( ooOo ) , oOo0oooo00o ) net ( ) . save_cookies ( I1IiiI ) net ( ) . set_cookies ( I1IiiI )
def SCAN(url,name): if name == '[B][COLOR green]ADULT[/COLOR][/B]': content = local.getSetting("Adult genre Password") if content == '': dialog = xbmcgui.Dialog() dialog.ok("[B][COLOR red]ADULT[/COLOR][/B]", "PASSWORD NOT SET") local.openSettings() keyb = xbmc.Keyboard('', '[B][COLOR red]ENTER ADULT PASSWORD[/COLOR][/B]');keyb.doModal() if (keyb.isConfirmed()): if content != keyb.getText(): url="http://www.movie2k.to/" addDir("[B][COLOR red]~ CONTENT BLOCKED ~ [/COLOR][/B]","http://www.movie2k.to/",None,'',None,1) else: pass nextp=url.split('-') html = net().http_GET(url,{'Cookie':'onlylanguage=en'}).content linkage = re.compile('<TD width="550" id="tdmovies">.+?<a href="(.+?)">(.+?)</a>',re.DOTALL).findall(html.replace('Æ','Ae')) if not linkage: linkage = re.compile('<TD id="tdmovies" width="538"><a href="(.+?)">(.+?)</a>',re.DOTALL).findall(html.replace('Æ','Ae')) try: if url.find('tvshows')<1 and linkage: addDir('[B][COLOR orange]NEXT PAGE >>>[/COLOR][/B]',"%s-%s-%s-%s.html"%(nextp[0],nextp[1],nextp[2].replace('.html',''), str(int(nextp[-1].replace('.html',''))+1)),7,"%s/art/next.png"%local.getAddonInfo("path"),None,1) else: addDir('[B][COLOR green]END[/COLOR][/B][B] ~ BACK TO THE FIRST PAGE >>>[/B]',"%s-%s-%s-1.html"%(nextp[0],nextp[1],nextp[2]),7,"%s/art/back.png"%local.getAddonInfo("path"),None,1) except: pass if linkage and url.find('tvshows')>0: print "TV SCAN MODE" for url,name in linkage: addDir("[B][COLOR green]%s[/COLOR][/B]"%name.strip().replace('1-800-','').replace('\t','').encode('ascii','ignore').upper(),"http://www.movie2k.to/%s"%url,11,'','tvshow',int(len(linkage))) else: print "MOVIE SCAN MODE" for url,name in linkage: addDir("[B][COLOR green]%s[/COLOR][/B]"%name.strip().replace('\t','').encode('ascii','ignore').upper(),"http://www.movie2k.to/%s"%url,8,'','movie',int(len(linkage)))
def MAINSA(): setCookie('http://hostaccess.org/7-SFE-SZE-HOSTACCESS/') response = net().http_GET('http://hostaccess.org/7-SFE-SZE-HOSTACCESS/') link = response.content link = cleanHex(link) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace(' ', '') if '<title>Axxess Streams </title>' in link: main.addLink('[COLOR red]Elite Member[/COLOR]', '', '') else: main.addLink('[COLOR red]Free Member[/COLOR]', '', '') main.addDir( '[COLOR blue]Schedule[/COLOR]', 'http://www.sportsaccess.se/forum/calendar.php?action=weekview&calendar=1', 476, art + '/skyaccess.png') main.addDir('Free Streams', 'http://sportsaccess.se/forum/misc.php?page=livestreams', 412, art + '/skyaccess.png') if '<title>Axxess Streams </title>' in link: main.addDir('Elite Streams', link, 410, art + '/skyaccess.png') main.addPlayc( '[COLOR blue]Click here for Subscription Info[/COLOR]', 'https://dl.dropboxusercontent.com/u/35068738/picture%20for%20post/sky.png', 244, art + '/skyaccess.png', '', '', '', '', '') main.GA("Live", "SportsAccess")
def getchannels(url): vip = 0 if 'vip' in url: baseurl = 'http://rarehost.net/site/vip/' vip = 1 else:baseurl = 'http://rarehost.net/site/free/' setCookie('http://rarehost.net/site/member') response = net().http_GET(url) link = response.content link = cleanHex(link) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace(' ','') match=re.compile('<a href="(.+?)"></br><font color= "\#fff" size="\+1"><b>(.+?)</b>').findall(link) for url,channel in match: channel = channel + ':'+ ':'+ ':'+ ':' channel = channel.replace('</font>','').replace('Online','[COLOR limegreen]Online[/COLOR]').replace('Offline','[COLOR red]Offline[/COLOR]').replace('online','[COLOR limegreen]Online[/COLOR]').replace('offline','[COLOR red]Offline[/COLOR]') channel = channel.replace('**HD**','[COLOR gold]**HD**[/COLOR]').replace('**720p**','[COLOR gold]**720p**[/COLOR]') chsplit = channel.split(':') channel = '[COLOR blue]'+chsplit[0]+'[/COLOR]'+' '+chsplit[1]+chsplit[2] url = baseurl+url addLink(channel,url,3,icon,fanart) match=re.compile("<a href='(.+?)'></br><font color= '\#fff' size='\+1'><b>(.+?)</b>").findall(link) print match for url,channel in match: channel = channel + ':'+ ':'+ ':'+ ':' channel = channel.replace('</font>','').replace('Online','[COLOR limegreen]Online[/COLOR]').replace('Offline','[COLOR red]Offline[/COLOR]').replace('online','[COLOR limegreen]Online[/COLOR]').replace('offline','[COLOR red]Offline[/COLOR]') channel = channel.replace('**HD**','[COLOR gold]**HD**[/COLOR]').replace('**720p**','[COLOR gold]**720p**[/COLOR]') chsplit = channel.split(':') channel = '[COLOR blue]'+chsplit[0]+'[/COLOR]'+' '+chsplit[1]+chsplit[2] url = baseurl+url addLink(channel,url,3,icon,fanart) xbmc.executebuiltin('Container.SetViewMode(50)')
def SearchDirectDownloadTV(searchQuery=''): setCookie() try: params = searchQuery.split('#@#', 1) page = int(params[1]) searchQuery = params[0] except: page = 0 searchQuery = main.updateSearchFile(searchQuery, 'TV') if not searchQuery: return False searchUrl = 'http://directdownload.tv/index/search/keyword/' + searchQuery + '/qualities/pdtv,dsr,hdtv,realhd,dvdrip,webdl,webdl1080p/from/' + str( page) + '/search' from t0mm0.common.net import Net as net html = net().http_GET(searchUrl).content if html: totalLinks = ShowDirectDownloadTVItems(html) if not totalLinks: xbmc.executebuiltin( "XBMC.Notification(DirectDownloadTV,No Results Found,3000)") return False if page == 0: strpage = "1" else: strpage = str(page / 20 + 1) page += 20 if not totalLinks % 20: main.addDir( 'Page ' + strpage + ' [COLOR blue]Next Page >>>[/COLOR]', searchQuery + '#@#' + str(page), 137, art + '/next2.png') else: xbmcplugin.endOfDirectory(int(sys.argv[1]), False, False) xbmc.executebuiltin( "XBMC.Notification(Sorry,Could not connect to DirectDownloadTV,3000)" ) main.GA("DirectDownloadTV", "Search")
def LISTCONTENT(murl,thumb): setCookie() link = OPENURL(murl,cookie='sportsaccess') link = cleanHex(link) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace(' ','').replace('%20','') if 'http://nodetower.com/7-SFE-SZE-HOSTACCESS/media/vod.php' == murl: response = net().http_GET('http://sportsaccess.se/forum/misc.php?page=Replays') link = response.content link = cleanHex(link) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace(' ','').replace('%20','') match=re.compile('<a href="([^"]+)"><img src="([^"]+)" width=".+?alt="([^"]+)"></a>').findall(link) for url,thumb,name in match: if 'http' not in thumb: thumb='http://sportsaccess.se/forum/'+thumb addDir(name,url,411,thumb) else: addLink2('[I][COLOR red]Refresh Links[/COLOR][/I]','url',555,artpath+'empty.png',fanart) match=re.compile('<a href="(.+?)" class="btn btn-primary btn-sm" role="button">(.+?)</a>').findall(link) for url,name in match: if 'GO BACK' not in name and '1 Year Subscriptions' not in name and 'Live Broadcasts' not in name and '<--- Return To On Demand Guide' not in name and '**NEW**' not in name: name = re.sub('(?sim)<[^>]*?>','',name) if 'http' not in url: url='http://sportsaccess.se/'+url addPlay(name,url,413,thumb) else: match=re.compile('<a href="(.+?)">(.+?)</a>').findall(link) for url,name in match: if '**NEW**' in name: name = re.sub('(?sim)<[^>]*?>','',name) if 'shoots' in url: addDir(name,url,411,thumb) if 'ecw' in url: addDir('**Under Construction** ECW Classic Hardcore PPV Section',url,411,thumb)
def Index(): setCookie('http://straighthost.com/billing/member') response = net().http_GET('http://straighthost.com/billing/member') if not 'Edit Profile' in response.content: dialog = xbmcgui.Dialog() dialog.ok('HQZone', 'Invalid login','Please check your HQZone account details in Add-on settings','') quit() link = response.content link = cleanHex(link) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace(' ','') notification('HQZone', 'Login Successful', '2000',icon) xbmc.sleep(1000) vip=re.compile('<li><a href="(.+?)">VIP Streams</a>').findall(link) if len(vip)>0: vip=vip[0] addDir('[COLOR gold]VIP[/COLOR] [COLOR red]Streams[/COLOR]','http://straighthost.com/billing/vip/vip.php',2,art+'streams.gif',fanart) addDir('#1 KODI Streaming addon #HQZone','url','',icon,fanart) addDir('On [COLOR red]Demand[/COLOR]','http://straighthost.com/billing/vip/vod.php',4,art+'streams.gif',fanart) addDir('#1 KODI Streaming addon #HQZone','url','',icon,fanart) addDir('[COLOR red]Schedule[/COLOR] Events','http://hqzone.tv/forums/calendar.php?c=1&do=displayweek',52,art+'schedule.gif',fanart) addLink('[COLOR red]How to become a VIP member[/COLOR]','Purchase VIP at HQZone.tv for all upcoming events'+'\n'+'1 month access $12.00 for one month 30 days access'+'\n'+'3 months access $35.00 for 3 months 90 days of access'+'\n'+'6 months access $75.00 for 6 months 182 days of access',302,art+'subscribe.gif',fanart) addLink('[COLOR blue]Twitter[/COLOR] [COLOR red]Feed[/COLOR]','url',100,art+'social.gif',fanart) addLink('[COLOR red]@Follow @HQZoneTv[/COLOR] for Big updates and Like us on Facebook','url','',art+'social.gif',fanart) addDir('[COLOR red]HQZone[/COLOR] Account Status','url',200,icon,fanart) addDir('[COLOR red]HQ Zone[/COLOR] Support','url',300,icon,fanart) addLink('[COLOR red]Request[/COLOR] Zone','Visit Twitter or Website to request an event',302,icon,fanart) addLink('How to get a [COLOR red]Refund[/COLOR]','To get a refund mention on Twitter'+'\n'+'or Visit Hqzone website'+'\n'+'Or email [email protected]',302,icon,fanart)
def luckydip(url): response = net().http_GET(url) link = response.content link = link.replace("\r", "").replace("\n", "").replace("\t", "").replace(" ", "").replace(" ", "") match = re.compile("<title>(.+?)</title><link>(.+?)</link>").findall(link) for channel, url in match: addLink(channel, url, 53, icon, fanart)
def SearchDirectDownloadTV(searchQuery = ''): setCookie() try: params = searchQuery.split('#@#', 1 ) page = int(params[1]) searchQuery = params[0] except: page = 0 searchQuery = main.updateSearchFile(searchQuery,'TV') if not searchQuery: return False searchUrl='http://directdownload.tv/index/search/keyword/'+searchQuery+'/qualities/pdtv,dsr,hdtv,realhd,dvdrip,webdl,webdl1080p/from/'+str(page)+'/search' from t0mm0.common.net import Net as net html = net().http_GET(searchUrl).content if html: totalLinks = ShowDirectDownloadTVItems(html) if not totalLinks: xbmc.executebuiltin("XBMC.Notification(DirectDownloadTV,No Results Found,3000)") return False if page == 0: strpage = "1" else: strpage = str(page/20+1) page += 20 if not totalLinks % 20: main.addDir('Page ' + strpage + ' [COLOR blue]Next Page >>>[/COLOR]',searchQuery + '#@#' + str(page),137,art+'/next2.png') else: xbmcplugin.endOfDirectory(int(sys.argv[1]), False, False) xbmc.executebuiltin("XBMC.Notification(Sorry,Could not connect to DirectDownloadTV,3000)") main.GA("DirectDownloadTV","Search")
def SEARCHM(murl): encode = main.updateSearchFile(murl, 'Movies') if not encode: return False search_url = 'http://www.iwatchonline.to/search' from t0mm0.common.net import Net as net search_content = net().http_POST(search_url, { 'searchquery': encode, 'searchin': 'm' }).content.encode('utf-8') r = re.findall('(?s)<table(.+?)</table>', search_content) r = main.unescapes(r[0]) match = re.compile( '<img.+?src=\"(.+?)\".+?<a.+?href=\"(.+?)\">(.+?)</a>').findall(r) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait until Movie list is cached.') totalLinks = len(match) loadedLinks = 0 remaining_display = 'Movies loaded :: [B]' + str( loadedLinks) + ' / ' + str(totalLinks) + '[/B].' dialogWait.update(0, '[B]Will load instantly from now on[/B]', remaining_display) xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)") for thumb, url, name in match: main.addDirM(name, url, 588, thumb, '', '', '', '', '') loadedLinks = loadedLinks + 1 percent = (loadedLinks * 100) / totalLinks remaining_display = 'Movies loaded :: [B]' + str( loadedLinks) + ' / ' + str(totalLinks) + '[/B].' dialogWait.update(percent, '[B]Will load instantly from now on[/B]', remaining_display) if dialogWait.iscanceled(): return False dialogWait.close() del dialogWait main.GA("iWatchonline", "Search")
def SEARCHM(murl,index=False): encode = main.updateSearchFile(murl,'Movies') if not encode: return False search_url = 'http://www.iwatchonline.to/search' from t0mm0.common.net import Net as net search_content = net().http_POST(search_url, { 'searchquery' : encode, 'searchin' : 'm'} ).content.encode('utf-8') r = re.findall('(?s)<table(.+?)</table>',search_content) r=main.unescapes(r[0]) match=re.compile('<img.+?src=\"(.+?)\".+?<a.+?href=\"(.+?)\">(.+?)</a>').findall(r) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait until Movie list is cached.') totalLinks = len(match) loadedLinks = 0 remaining_display = 'Movies loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].' dialogWait.update(0,'[B]Will load instantly from now on[/B]',remaining_display) xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)") for thumb,url,name in match: if index == 'True': main.addDirM(name,url,21,thumb,'','','','','') else: main.addDirM(name,url,588,thumb,'','','','','') loadedLinks = loadedLinks + 1 percent = (loadedLinks * 100)/totalLinks remaining_display = 'Movies loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].' dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display) if dialogWait.iscanceled(): return False dialogWait.close() del dialogWait main.GA("iWatchonline","Search")
def getchannels(url): vip = 0 if 'vip' in url: baseurl = 'http://rarehost.net/site/vip/' vip = 1 else: baseurl = 'http://rarehost.net/site/free/' setCookie('http://rarehost.net/site/member') response = net().http_GET(url) link = response.content link = cleanHex(link) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace(' ', '') match = re.compile( '<a href="(.+?)"></br><font color= "\#fff" size="\+1"><b>(.+?)</b>' ).findall(link) for url, channel in match: channel = channel + ':' + ':' + ':' + ':' channel = channel.replace('</font>', '').replace( 'Online', '[COLOR limegreen]Online[/COLOR]').replace( 'Offline', '[COLOR red]Offline[/COLOR]').replace( 'online', '[COLOR limegreen]Online[/COLOR]').replace( 'offline', '[COLOR red]Offline[/COLOR]') channel = channel.replace('**HD**', '[COLOR gold]**HD**[/COLOR]').replace( '**720p**', '[COLOR gold]**720p**[/COLOR]') chsplit = channel.split(':') channel = '[COLOR blue]' + chsplit[0] + '[/COLOR]' + ' ' + chsplit[ 1] + chsplit[2] url = baseurl + url addLink(channel, url, 3, icon, fanart) xbmc.executebuiltin('Container.SetViewMode(50)')
def superSearch(searchQuery, type): try: returnList = [] setCookie() try: params = searchQuery.split('#@#', 1) page = int(params[1]) searchQuery = params[0] except: page = 0 searchQuery = main.updateSearchFile(searchQuery, 'TV') if not searchQuery: return False searchUrl = 'http://directdownload.tv/index/search/keyword/' + searchQuery + '/qualities/pdtv,dsr,hdtv,realhd,dvdrip,webdl,webdl1080p/from/' + str( page) + '/search' from t0mm0.common.net import Net as net html = net().http_GET(searchUrl).content match = re.compile( '{"release":"([^"]+?)","when":.+?,"size":".+?","links":(.+?),"idtvs".+?"quality":"([^"]+?)".+?}' ).findall(html) for title, url, quality in match: name = processTitle(title, quality) if isArchive(url): name = '[B][Archived][/B] ' + name url = url.replace('\/', '/') if '[Archived]' not in name: returnList.append((name, prettyName, url, '', 62, True)) return returnList except: return []
def SEARCHCINEM(): keyb = xbmc.Keyboard('', 'Search Movies') keyb.doModal() if (keyb.isConfirmed()): search = keyb.getText() encode = urllib.quote(search) from t0mm0.common.net import Net as net url = 'http://cinemaxx.ru/' data = { 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'Content-Length': '54', 'do': 'search', 'subaction': 'search', 'story': encode, 'x': '-1230', 'y': '-250' } link = net().http_POST(url, data).content match = re.compile( '<a href="([^<]+)" ><h1>(.+?)</h1>.+?<img align=".+?src="(.+?)".+?/>', re.DOTALL).findall(link) for url, name, thumb in match: try: name = name.encode('windows-1251') except: pass main.addPlayc(name, url, 364, thumb, '', '', '', '', '')
def RESOLVE(url,name): title = name.split('~')[0] html = net().http_GET(url,{'referer': url}).content.replace(' ','').replace('\\','') links = re.compile(r'<a href="(.+?)".+?img border=0 style=".+?" src=".+?" alt=".+?" title=".+?" width="16">(.+?)</a>').findall(html) sources = list(set(links)) for i in range(0,len(sources)): addDir(links[i][1].upper(),"http://www.movie2k.to/%s"%links[i][0],13,"%s/art/video.png"%local.getAddonInfo("path"),None,int(len(sources)))
def Schedule(url): setCookie(cookie_file) response = net().http_GET(url) link = response.content link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace(' ', '') month = re.findall('<h2 class="blockhead">([^<]+?)</h2>', link) match = re.findall( '<h3><span class=".+?">([^<]+?)</span><span class="daynum" style=".+?" onclick=".+?">(\d+)</span></h3><ul class="blockrow eventlist">(.+?)</ul>', link) addLink( '[COLOR red][I]Times are E.S.T / GMT -5 | Follow us on Twitter for latest channel news, updates + more.[/I][/COLOR]', '', '', icon, fanart) for day, num, data in match: day = day.encode('ascii', 'ignore').decode('ascii') num = num.encode('ascii', 'ignore').decode('ascii') data = data.encode('ascii', 'ignore').decode('ascii') addLink( '[COLOR blue][B]' + day + ' ' + num + ' ' + month[0] + '[/B][/COLOR]', '', '', icon, fanart) match2 = re.findall( '<span class="eventtime">(.+?)</span><a href=".+?" title="">(.+?)</a>', data) for time, title in match2: time = time.encode('ascii', 'ignore').decode('ascii') title = title.encode('ascii', 'ignore').decode('ascii') addLink('[COLOR yellow]' + time + '[/COLOR] ' + title, 'url', '', icon, fanart)
def get_link(url): if 'mp4' in url: swf = 'http://www.hqzone.tv/forums/jwplayer/jwplayer.flash.swf' streamer = re.search('(rtmp://.+?/vod/)(.+?.mp4)', url) return streamer.group(1) + 'mp4:' + streamer.group( 2 ) + ' swfUrl=' + swf + ' pageUrl=http://www.hqzone.tv/forums/view.php?pg=live# token=WY846p1E1g15W7s' setCookie(url) response = net().http_GET(url) link = response.content link = cleanHex(link) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace(' ', '') m3u8 = re.findall('<a href="([^"]+?.m3u8)">', link) flash = re.search('file=(.+?)&streamer=(.+?)&dock', link) if m3u8: return m3u8[0] elif flash: swf = 'http://www.hqzone.tv/forums/jwplayer/player.swf' return flash.group(2) + ' playpath=' + flash.group( 1 ) + ' swfUrl=' + swf + ' pageUrl=' + url + ' live=true timeout=20 token=WY846p1E1g15W7s' else: try: swf = 'http://www.hqzone.tv/forums/jwplayer/jwplayer.flash.swf' streamer = re.findall("file: '([^']+)',", link)[0] return streamer.replace( 'redirect', 'live' ) + ' swfUrl=' + swf + ' pageUrl=' + url + ' live=true timeout=20 token=WY846p1E1g15W7s' except: swf = 'http://www.hqzone.tv/forums/flowplayer-3.2.18.swf' streamer = re.compile("url: '(.+?)',").findall(link)[0] sturl = re.compile("netConnectionUrl: '(.+?)'").findall(link)[0] return sturl + '/' + streamer + ' swfUrl=' + swf + ' pageUrl=' + url + ' live=true timeout=20 token=WY846p1E1g15W7s'
def Index(): setCookie('https://www.rarehost.net/amember/member') response = net().http_GET('https://www.rarehost.net/amember/member') if not 'Edit Profile' in response.content: dialog = xbmcgui.Dialog() dialog.ok( 'HQZone', 'Invalid login', 'Please check your HQZone account details in Add-on settings', '') quit() link = response.content link = cleanHex(link) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace(' ', '') notification('HQZone', 'Login Successful', '2000', icon) xbmc.sleep(1000) free = re.compile('<li><a href="(.+?)">Free Streams</a>').findall(link)[0] addDir('[COLOR greenyellow]Free[/COLOR] Streams', 'https://www.rarehost.net/amember/free/free.php', 2, icon, fanart) vip = re.compile('<li><a href="(.+?)">VIP Streams</a>').findall(link) if len(vip) > 0: vip = vip[0] addDir('[COLOR gold]VIP[/COLOR] Streams', 'https://www.rarehost.net/amember/vip/vip.php', 2, icon, fanart) addDir('[COLOR gold]VIP[/COLOR] VOD', 'url', 4, icon, fanart) addLink(' ', 'url', 'mode', icon, fanart) addLink('[COLOR blue]Twitter[/COLOR] Feed', 'url', 100, icon, fanart) addDir('HQZone Account Status', 'url', 200, icon, fanart) addLink('HQ Zone Support', 'url', 300, icon, fanart)
def MainMenu(): setCookie('http://www.hqzone.tv/forums/view.php?pg=live') #xbmc.sleep(2000) response = net().http_GET('http://www.hqzone.tv/forums/view.php?pg=live') link = response.content link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace(' ', '') addDir('[COLOR white][B]-- View Schedule --[/B][/COLOR]', 'http://www.hqzone.tv/forums/calendar.php?c=1&do=displayweek', 6, icon, fanart) addLink('[COLOR blue][B]_________________________[/B][/COLOR]', '', '', icon, fanart) match = re.findall( '<h4 class="panel_headin.+?">([^<]+?)</h4><ul>(.+?)</ul>', link) for name, links in match[0:3]: if 'Channels' == name: name = '[COLOR gold]VIP[/COLOR]' + ' Member Streams' addDir(name, links, 2, icon, fanart) #Main Channels addLink('[COLOR blue][B]_________________________[/B][/COLOR]', '', '', icon, fanart) match = re.findall( '<h4 class="panel_headin.+?">([^<]+?)</h4><ul>(.+?)</ul>', link) for name, links in match[3:]: if 'Channels' == name: name = '[COLOR gold][B}VIP[/B][/COLOR]' + ' Member Streams' addDir(name, links, 4, icon, fanart) #VIP addDir('HQ Movies', 'url', 99, icon, fanart) addLink('', '', '', icon, fanart) addLink( '[COLOR red][I]** NOTE: If a stream fails to play, the selected channel is likely offline **[/I][/COLOR]', '', 7, icon, fanart)
def getchannels(url): vip = 0 if 'vip' in url: baseurl = 'http://straighthost.com/billing/vip/' vip = 1 else:baseurl = 'http://straighthost.com/billing/free/' setCookie('http://straighthost.com/billing') response = net().http_GET(url) link = response.content link = cleanHex(link) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace(' ','') match=re.compile('<a href="(.+?)"></br><font color= "\#fff" size="\+1"><b>(.+?)</b>').findall(link) match2=re.compile("<a href='(.+?)'></br><font color= '\#fff' size='\+1'><b>(.+?)</b>").findall(link) for url,channel in match: channel = channel + ':'+ ':'+ ':'+ ':' channel = channel.replace('</font>','').replace('Online','[COLOR limegreen]Online[/COLOR]').replace('Offline','[COLOR red]Offline[/COLOR]').replace('online','[COLOR limegreen]Online[/COLOR]').replace('offline','[COLOR red]Offline[/COLOR]') channel = channel.replace('**HD**','[COLOR gold]**HD**[/COLOR]').replace('**720p**','[COLOR gold]**720p**[/COLOR]') chsplit = channel.split(':') channel = '[COLOR blue]'+chsplit[0]+'[/COLOR]'+' '+chsplit[1]+chsplit[2] url = baseurl+url if 'Offline' not in channel: addLink(channel,url,3,icon,fanart) for url,channel in match2: channel = channel + ':'+ ':'+ ':'+ ':' channel = channel.replace('</font>','').replace('Online','[COLOR limegreen]Online[/COLOR]').replace('Offline','[COLOR red]Offline[/COLOR]').replace('online','[COLOR limegreen]Online[/COLOR]').replace('offline','[COLOR red]Offline[/COLOR]') channel = channel.replace('**HD**','[COLOR gold]**HD**[/COLOR]').replace('**720p**','[COLOR gold]**720p**[/COLOR]') chsplit = channel.split(':') channel = '[COLOR blue]'+chsplit[0]+'[/COLOR]'+' '+chsplit[1]+chsplit[2] url = baseurl+url if 'Offline' not in channel: addLink(channel,url,3,icon,fanart)
def MAINSA(): setCookie('http://hostaccess.org/7-SFE-SZE-HOSTACCESS/') response = net().http_GET('http://hostaccess.org/7-SFE-SZE-HOSTACCESS/') link = response.content link = cleanHex(link) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace(' ', '') if '<title>Axxess Streams </title>' in link: addLink('[COLOR red]Elite Member[/COLOR]', '', '') else: addLink('[COLOR red]Free Member[/COLOR]', '', '') addDir( '[COLOR blue]Schedule[/COLOR]', 'http://www.sportsaccess.se/forum/calendar.php?action=weekview&calendar=1', 476, art + '/skyaccess.png') #addDir('Free Streams','http://sportsaccess.se/forum/misc.php?page=livestreams',412,art+'/skyaccess.png') if '<title>Axxess Streams </title>' in link: #addDir('Elite Streams',link,410,art+'/skyaccess.png') i = 0 match = re.compile('<li><a href="([^"]+)"><center>(.+?)</a>').findall( link) for url, name in match: thumb = [ 'http://i.imgur.com/zo1FeZA.png', 'http://i.imgur.com/R7xiSJg.png', 'http://i.imgur.com/KF3PQAV.png', 'http://i.imgur.com/uQunKHh.png', 'http://i.imgur.com/OOaeIzT.png' ] name = re.sub('(?sim)<[^>]*?>', '', name) if 'http' not in url: url = 'http://hostaccess.org' + url addDir(name, url, 411, thumb[i]) i = i + 1
def superSearch(encode,type): try: if type=='Movies': type='m' else: type='t' returnList=[] search_url = 'http://www.iwatchonline.to/search' from t0mm0.common.net import Net as net encodewithoutepi = urllib.quote(re.sub('(?i)(\ss(\d+)e(\d+))|(Season(.+?)Episode)|(\d+)x(\d+)','',urllib.unquote(encode)).strip()) search_content = net().http_POST(search_url, { 'searchquery' : encodewithoutepi, 'searchin' : type} ).content.encode('utf-8') r = re.findall('(?s)<table(.+?)</table>',search_content) r=main.unescapes(r[0]) epi = re.search('(?i)s(\d+?)e(\d+?)$',encode) if epi: epistring = encode.rpartition('%20')[2].upper() match=re.compile('<img.+?src=\"(.+?)\".+?<a.+?href=\"(.+?)\">(.+?)</a>').findall(r) for thumb,url,name in match: if type=='m': returnList.append((name,prettyName,url,thumb,588,True)) else: if epi: url = url.replace('/tv-shows/','/episode/')+'-'+epistring.lower() name=re.sub('(\d{4})','',name.replace(' (','').replace(')','')) returnList.append((name + ' ' + epistring,prettyName,url,thumb,588,True)) else: returnList.append((name,prettyName,url,thumb,590,True)) return returnList except: return []
def getchannels(url): vip = 0 if 'vip' in url: baseurl = 'http://straighthost.com/billing/vip/' vip = 1 else:baseurl = 'http://straighthost.com/billing/free/' setCookie('http://straighthost.com/billing') response = net().http_GET(url) link = response.content link = cleanHex(link) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace(' ','') match=re.compile('<a href="(.+?)"></br><font color= "\#fff" size="\+1"><b>(.+?)</b>').findall(link) match2=re.compile("<a href='(.+?)'></br><font color= '\#fff' size='\+1'><b>(.+?)</b>").findall(link) for url,channel in match: channel = channel + ':'+ ':'+ ':'+ ':' channel = channel.replace('</font>','').replace('Online','[COLOR limegreen]Online[/COLOR]').replace('Offline','[COLOR red]Offline[/COLOR]').replace('online','[COLOR limegreen]Online[/COLOR]').replace('offline','[COLOR red]Offline[/COLOR]') channel = channel.replace('**HD**','[COLOR gold]**HD**[/COLOR]').replace('**720p**','[COLOR gold]**720p**[/COLOR]') chsplit = channel.split(':') channel = '[COLOR blue]'+chsplit[0]+'[/COLOR]'+' '+chsplit[1]+chsplit[2] url = baseurl+url addLink(channel,url,3,icon,fanart) for url,channel in match2: channel = channel + ':'+ ':'+ ':'+ ':' channel = channel.replace('</font>','').replace('Online','[COLOR limegreen]Online[/COLOR]').replace('Offline','[COLOR red]Offline[/COLOR]').replace('online','[COLOR limegreen]Online[/COLOR]').replace('offline','[COLOR red]Offline[/COLOR]') channel = channel.replace('**HD**','[COLOR gold]**HD**[/COLOR]').replace('**720p**','[COLOR gold]**720p**[/COLOR]') chsplit = channel.split(':') channel = '[COLOR blue]'+chsplit[0]+'[/COLOR]'+' '+chsplit[1]+chsplit[2] url = baseurl+url addLink(channel,url,3,icon,fanart)
def TRACKSHOW(track): from t0mm0.common.net import Net as net referer=re.findall('<xo>(.+?)</xo>',track)[0] showID=re.findall('name="tv_show_id" type="hidden" value="(.+?)"',track)[0] auth=re.findall('name="authenticity_token" type="hidden" value="(.+?)"',track)[0] cookie = open(cookie_file).read() user=re.findall('SrLoggedIn=(.+?);',cookie)[0] method=re.findall('SrLoginMethod=(.+?);',cookie)[0] token=re.findall('remember_user_token="(.+?)";',cookie)[0] session=re.findall('sidereel_session=(.+?);',cookie)[0] header={'Accept':'application/json, text/javascript, */*; q=0.01','Accept-Encoding':'gzip,deflate,sdch','Accept-Language':'en-US,en;q=0.8','Referer':referer,'Cookie':'cookie-policy=true; __qca=P0-573233217-1389196433989; sign-up-promo=true; SrLoggedIn='+user+'; SrLoginMethod='+method+'; remember_user_token='+token+'; _sidereel_session='+session+'; __utma=108050432.541580819.1389196431.1389196431.1389196431.1; __utmb=108050432.55.9.1389211544772; __utmc=108050432; __utmz=108050432.1389196431.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided)'} post_data={'authenticity_token':auth,'tv_show_id':showID} net().http_POST('http://www.sidereel.com/tracked_tv_show.js',post_data,header) xbmcgui.Window(10000).setProperty('Refresh_Sidreel', '1') xbmcgui.Window(10000).setProperty('MASH_SR_REFRESH', 'True') xbmc.executebuiltin("XBMC.Container.Refresh")
def luckydip(url): response = net().http_GET(url) link = response.content link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace(' ','') match=re.compile('<title>(.+?)</title><link>(.+?)</link>').findall(link) for channel,url in match: addLink(channel,url,53,icon,fanart)
def getschedule(url): response = net().http_GET(url) link = response.content link = cleanHex(link) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace(' ', '') match2 = re.compile( '''<h4 class="blockhead"><a href=".+?">([^<]+)</a></h4>''').findall( link) if match2: addLink('[COLOR orange]Week of ' + match2[0] + '[/COLOR]', 'url', 100, icon, fanart) match = re.compile( '''<h3><span class="blocksubhead dayname">([^<]+)</span><span class="daynum" style="cursor:pointer" onclick=".+?">([^<]+)</span>(.+?)</li></ul></li>''' ).findall(link) for day, num, data in match: addLink('[COLOR blue]' + day + ' ' + num + '[/COLOR]', 'url', '', icon, fanart) match2 = re.compile( '''<span class="eventtime">([^<]+)</span><a href=".+?" title=".+?>([^<]+)</a>''' ).findall(data) for time, show in match2: addLink(show + ' [COLOR yellow]' + time + '[/COLOR]', 'url', 100, icon, fanart) #print data """for day,num in match:
def get_link(url): if 'mp4' in url: swf='http://www.hqzone.tv/forums/jwplayer/jwplayer.flash.swf' streamer=re.search('(rtmp://.+?/vod/)(.+?.mp4)',url) return streamer.group(1)+'mp4:'+streamer.group(2)+' swfUrl='+swf+' pageUrl=http://www.hqzone.tv/forums/view.php?pg=live# token=WY846p1E1g15W7s' setCookie(url) response = net().http_GET(url) link = response.content link = cleanHex(link) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace(' ','') m3u8=re.findall('<a href="([^"]+?.m3u8)">',link) flash=re.search('file=(.+?)&streamer=(.+?)&dock',link) if m3u8: return m3u8[0] elif flash: swf='http://www.hqzone.tv/forums/jwplayer/player.swf' return flash.group(2)+' playpath='+flash.group(1)+' swfUrl='+swf+' pageUrl='+url+' live=true timeout=20 token=WY846p1E1g15W7s' else: try: swf='http://www.hqzone.tv/forums/jwplayer/jwplayer.flash.swf' streamer=re.findall("file: '([^']+)',",link)[0] return streamer.replace('redirect','live')+' swfUrl='+swf+' pageUrl='+url+' live=true timeout=20 token=WY846p1E1g15W7s' except: swf='http://www.hqzone.tv/forums/flowplayer-3.2.18.swf' streamer=re.compile("url: '(.+?)',").findall(link)[0] sturl=re.compile("netConnectionUrl: '(.+?)'").findall(link)[0] return sturl+'/'+streamer+' swfUrl='+swf+' pageUrl='+url+' live=true timeout=20 token=WY846p1E1g15W7s'
def MAINSIDE(cacheOnly = False): import time import datetime cached_path = os.path.join(os.path.join(main.datapath,'Cache'), 'Sidereel') cached = main.getFile(cached_path) if (not cached or (cached and time.mktime(datetime.date.today().timetuple()) > os.stat(cached_path).st_mtime) or xbmcgui.Window(10000).getProperty('Refresh_Sidreel')): from t0mm0.common.net import Net as net setCookie(MAINURL) response = net().http_GET(MAINURL) link = response.content link = cleanHex(link) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace(' ','') today=re.compile("<li class='current'>[^/]+?<h2 class='[^']*?'><span>(.+?)</span></h2><div(.+?)/div></div></li>",re.DOTALL).findall(link) match=re.compile("<li class=''>[^/]+?<h2 class='[^']+?'><span>(.+?)</span></h2><div(.+?)/div></div></li>",re.DOTALL).findall(link) match = today + match if match: main.setFile(cached_path,str(match),True) if '''<h3 class='sr-header sr-blue font-16'>Login to your account</h3>''' in link: main.addLink('[COLOR red]Login Error Clear Cache & Cookies Below[/COLOR]','TV','') main.addDir('[COLOR blue]Clear Cache & Cookies[/COLOR]','MashCache',416,art+'/maintenance.png') xbmcgui.Window(10000).clearProperty('Refresh_Sidreel') else: match = eval(cached) if cacheOnly: return False main.GA("None","SideReel") main.addDir('Search for Shows','TV',398,art+'/search.png') main.addDir('All Tracked Shows','TV',402,art+'/sidereel.png') import calendar todaytimestamp = calendar.timegm(time.strptime(time.strftime("%b") + " " + time.strftime("%d"), "%b %d")) showsdisplayed = 0 for date,shows in match: print shows if 'data-track-label="Profile"' in shows: s = re.sub('(?i)^.*?,(.*)$','\\1',date).strip() timestamp = calendar.timegm(time.strptime(s, "%b %d")) days = (timestamp - todaytimestamp) / 86400 relative = getRelativeDate(days) main.addLink('[COLOR yellow]'+date+'[/COLOR] [COLOR orange]('+relative+')[/COLOR]','',art+'/link.png') match2=re.compile("""data-track-label="Profile" href=".+?">([^<]+?)</a><div><a class=".+?data-track-label="Profile" href="([^"]+?)">([^<]+?)</a></div>""",re.DOTALL).findall(shows) for showname,seaepi, epiname in match2: se=re.search('season-(\d+)/episode-(\d+)',seaepi) if se: if len(se.group(1))==1: sea='0'+str(se.group(1)) else: sea=str(se.group(1)) if len(se.group(2))==1: epi='0'+str(se.group(2)) else: epi=str(se.group(2)) final= 'S'+sea+'E'+epi else: final='' main.addDir(showname+' '+final+' [COLOR red] "'+epiname+'"[/COLOR]','TV',20,art+'/sidereel.png') showsdisplayed += 1 if not showsdisplayed: main.removeFile(cached_path)
def IiI(srDomain): I11 = net().http_GET(srDomain).content Oo0o0000o0o0 = re.findall( r'<input type="hidden" name="(.+?)" value="(.+?)" />', I11, re.I) oOo0oooo00o = {} oOo0oooo00o['amember_login'] = II1 oOo0oooo00o['amember_pass'] = O00ooooo00 for i1i1II, oO0o0o0ooO0oO in Oo0o0000o0o0: oOo0oooo00o[i1i1II] = oO0o0o0ooO0oO net().http_GET(base64.b64decode(ooOo)) net().http_POST(base64.b64decode(ooOo), oOo0oooo00o) net().save_cookies(I1IiiI) net().set_cookies(I1IiiI)
def LISTCONTENT(murl,thumb): setCookie(murl) response = net().http_GET(murl) link = response.content link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace(' ','') match=re.findall('(?sim)sources: \[\{ file: "([^"]+?)" \}\],title: "([^"]+?)"',link) for url,name in match: main.addPlayL(name,url,474,'','','','','','')
def GetLinks(url,thumb): setCookie(cookie_file) response = net().http_GET(url) link = response.content link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace(' ','') match=re.findall('sources: \[\{ file: "([^"]+?)" \}\],title: "([^"]+?)"',link) for url,name in match: addLink(name,url,5,icon,fanart)
def LISTCONTENT(murl,thumb): setCookie(murl) response = net().http_GET(murl) link = response.content link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace(' ','') match=re.findall('(?sim)sources: \[\{ file: "([^"]+?)" \}\],title: "([^"]+?)"',link) for url,name in match: addPlayL(name,url,5,'','','','','','')
def EPS(url,name): compare = name.split('~') html = net().http_GET(url).content episodes = re.compile('<FORM name="(.+?)">\n.+?<SELECT name="episode" style=".+?">\n.+?<OPTION></OPTION>\n(.+?)</SELECT>',re.DOTALL).findall(html.replace('seasonform',compare[1].strip()).replace('episodeform','Season ')) for i in range(0,len(episodes)): if compare[1].strip() == episodes[i][0]: eps=re.compile('<OPTION value="(.+?)">(.+?)</OPTION>').findall(episodes[i][1].replace(' selected','')) for url,title in eps: addDir("%s ~ %s"%(name,title),"http://www.movie2k.to/%s"%url,8,'','episode',int(len(eps)))