def GENRE(name,cat): _GENRE_=name.lower() now= datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S').replace(' ','%20') net.set_cookies(cookie_jar) url='&mwAction=category&xbmc=2&mwData={"id":"%s","time":"%s","type":"tv"}'%(cat,now) link = net.http_GET(site+url, headers={'User-Agent' : UA }).content data = json.loads(link) channels=data['contents'] uniques=[] offset= int(data['offset']) for field in channels: genre = field['genre'] endTime = field['time_to'] name = field['name'].encode("utf-8") channel = field['id'] whatsup = field['whatsup'].encode("utf-8") description = field['descr'].encode("utf-8") r=re.compile("(.+?)-(.+?)-(.+?) (.+?):(.+?):(.+?)") matchend = r.search(endTime) endyear = matchend.group(1) endmonth = matchend.group(2) endday = matchend.group(3) endhour = matchend.group(4) endminute = matchend.group(5) endDate = datetime.datetime(int(endyear),int(endmonth),int(endday),int(endhour),int(endminute)) + datetime.timedelta(seconds = offset) if ADDON.getSetting('tvguide')=='true': name='%s - [COLOR yellow]%s[/COLOR]'%(name,whatsup) if genre == _GENRE_: addDir(name,'url',200,imageUrl+channel+'.png',channel,'',description,now,endDate,whatsup) setView('movies', 'channels-view')
def LOGIN_VK(number,password,GET_URL): headers = {} headers.update({'Content-Type': 'application/x-www-form-urlencoded', 'Connection': 'keep-alive', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'Accept-Encoding': 'gzip,deflate,sdch', 'Accept-Language': 'en-GB,en-US;q=0.8,en;q=0.6', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36'}) html = net.http_GET('http://vk.com') ip_h = re.search(r'ip_h\"\svalue=\"(.*?)\"', html.content, re.I) html = net.http_POST('https://login.vk.com/?act=login', {'act':'login','role':'al_frame','expire':'', 'captcha_sid':'','_origin':'http://vk.com','ip_h':ip_h.group(1), 'email':str(number),'pass':str(password)}) if os.path.exists(cookie_path) == False: os.makedirs(cookie_path) net.save_cookies(cookie_jar) net.set_cookies(cookie_jar) html = net.http_GET(GET_URL).content.replace('\\','') return html
def onClick(self, controlID): if controlID == 7: if int(self.getControl(5).isSelected()) > 0: self.card_type = 'master' if int(self.getControl(6).isSelected()) > 0: self.card_type = 'visa' xbmc.executebuiltin( "Skin.Reset(AnimeWindowXMLDialogClose)" ) self.close() self.name = self.getControl(8).getText().replace(' ','%20') self.card_number = self.getControl(9).getText() self.expiry_month = self.getControl(10).getText() self.expiry_year = self.getControl(21).getText() self.sec_cvv = self.getControl(22).getText() net.set_cookies(cookie_jar) url = 'https://www.wliptv.com/?c=8&a=15&oid=%s&card={"type":"%s","number":"%s","name":"%s","month":"%s","year":"%s","cvv":"%s"}'%(self.cat, self.card_type, self.card_number, self.name, self.expiry_month, self.expiry_year, self.sec_cvv) link = net.http_GET(url, headers={'User-Agent' : UA}).content data = json.loads(link) if 'success' in link: dialog = xbmcgui.Dialog() winput= data['message'] dialog.ok("IPTV World", '',winput, '') else: dialog = xbmcgui.Dialog() winput= data['message'] dialog.ok("IPTV World", '',winput, '') if dialog.yesno("IPTV World", "Do You Want To Try Again", ""): card_payment('thingy.xml',ADDON.getAddonInfo('path'),'DefaultSkin',cat=cat).show() else: return
def login(): loginurl = 'https://tvplayer.com/account/login/' email = ADDON.getSetting('email') password = ADDON.getSetting('password') UA = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36' headers = { 'Host': 'tvplayer.com', 'Connection': 'keep-alive', 'Cache-Control': 'max-age=0', 'Origin': 'https://tvplayer.com', 'Upgrade-Insecure-Requests': '1', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36', 'Content-Type': 'application/x-www-form-urlencoded', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'Referer': 'https://tvplayer.com/watch', 'Accept-Encoding': 'gzip, deflate, br', 'Accept-Language': 'en-US,en;q=0.8' } link = net.http_GET(loginurl, headers).content net.save_cookies(cookie_jar) token = re.compile('name="token" value="(.+?)"').findall(link)[0] data = {'email': email, 'password': str(password), 'token': token} net.set_cookies(cookie_jar) net.http_POST(loginurl, data, headers) net.save_cookies(cookie_jar)
def server(): net.set_cookies(cookie_jar) a=net.http_GET('http://'+THESITE+'/payments/api/matrix/channels',headers={'User-Agent' :UA}).content print 'WEB READ' return a
def CARDDETAILS(cat): nameselect=['Cancel','Visa','Mastercard'] returnselect=['Cancel','visa','master'] type= returnselect[xbmcgui.Dialog().select('Please Card Type', nameselect)] if not 'Cancel' in type: name=Search('Name On Card').replace(' ','%20') card=Numeric('16 Digit Card Number') month=Numeric('Expiry Month') year=Numeric('Expiry Full Year (YYYY)') cvv=Numeric('Security On Back Of Card (CVV)') url='https://www.wliptv.com/?c=8&a=15&oid=%s&card={"type":"%s","number":"%s","name":"%s","month":"%s","year":"%s","cvv":"%s"}'%(cat,type,card,name,month,year,cvv) net.set_cookies(cookie_jar) link = net.http_GET(url, headers={'User-Agent' : UA}).content data = json.loads(link) if 'success' in link: dialog = xbmcgui.Dialog() winput= data['message'] dialog.ok("IPTV World", '',winput, '') else: dialog = xbmcgui.Dialog() winput= data['message'] dialog.ok("IPTV World", '',winput, '') if dialog.yesno("IPTV World", "Do You Want To Try Again", ""): CARDDETAILS(cat) else: return
def CARDDETAILS(cat): nameselect = ["Cancel", "Visa", "Mastercard"] returnselect = ["Cancel", "visa", "master"] type = returnselect[xbmcgui.Dialog().select("Please Card Type", nameselect)] if not "Cancel" in type: name = Search("Name On Card").replace(" ", "%20") card = Numeric("16 Digit Card Number") month = Numeric("Expiry Month") year = Numeric("Expiry Full Year (YYYY)") cvv = Numeric("Security On Back Of Card (CVV)") url = ( 'https://www.ntv.mx/?c=8&a=15&oid=%s&card={"type":"%s","number":"%s","name":"%s","month":"%s","year":"%s","cvv":"%s"}' % (cat, type, card, name, month, year, cvv) ) net.set_cookies(cookie_jar) link = net.http_GET(url).content data = json.loads(link) if "success" in link: dialog = xbmcgui.Dialog() winput = data["message"] dialog.ok("NTV.mx", "", winput, "") else: dialog = xbmcgui.Dialog() winput = data["message"] dialog.ok("NTV.mx", "", winput, "") if dialog.yesno("NTV.mx", "Do You Want To Try Again", ""): CARDDETAILS(cat) else: return
def CARDDETAILS(cat): nameselect=['Cancel','Visa','Mastercard'] returnselect=['Cancel','visa','master'] type= returnselect[xbmcgui.Dialog().select('Please Card Type', nameselect)] if not 'Cancel' in type: name=Search('Name On Card').replace(' ','%20') card=Numeric('16 Digit Card Number') month=Numeric('Expiry Month') year=Numeric('Expiry Full Year (YYYY)') cvv=Numeric('Security On Back Of Card (CVV)') url='https://www.wliptv.com/?c=8&a=15&oid=%s&card={"type":"%s","number":"%s","name":"%s","month":"%s","year":"%s","cvv":"%s"}'%(cat,type,card,name,month,year,cvv) net.set_cookies(cookie_jar) link = net.http_GET(url, headers={'User-Agent' : UA}).content data = json.loads(link) if 'success' in link: dialog = xbmcgui.Dialog() winput= data['message'] dialog.ok("wliptv", '',winput, '') else: dialog = xbmcgui.Dialog() winput= data['message'] dialog.ok("wliptv", '',winput, '') if dialog.yesno("wliptv", "Do You Want To Try Again", ""): CARDDETAILS(cat) else: return
def PLAY_STREAM(name,url,iconimage,cat): try: _name=name.split(' -')[0].replace('[/COLOR]','').replace('[COLOR yellow]','') playername=name.split('- ')[1].replace('[/COLOR]','').replace('[COLOR yellow]','') except: _name=name.replace('[/COLOR]','') playername=name.replace('[/COLOR]','') net.set_cookies(cookie_jar) url = '&mwAction=content&xbmc=1&mwData={"id":%s,"type":"tv"}'%cat link = net.http_GET(site+url, headers={'User-Agent' : UA}).content if '"allown":false' in link: try: match=re.compile('"message":"(.+?)"').findall(link) dialog = xbmcgui.Dialog() dialog.ok("NTV.mx", '', match[0].replace('\/','/')) except: dialog = xbmcgui.Dialog() dialog.ok("NTV.mx", '', 'Please Sign Up To Watch The Streams') else: match=re.compile('"src":"(.+?)","type":"rtmp"').findall(link) if match: url=match[0].replace('\/','/') else: match=re.compile('"src":"(.+?)","type":"hls"').findall(link) hls=match[0].replace('\/','/') url=hls liz=xbmcgui.ListItem(playername, iconImage="DefaultVideo.png", thumbnailImage=iconimage) liz.setInfo( type="Video", infoLabels={ "Title": playername} ) liz.setProperty("IsPlayable","true") liz.setPath(url) xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, liz)
def PLAY_STREAM(name, url, iconimage, cat): try: _name = name.split(" -")[0].replace("[/COLOR]", "").replace("[COLOR yellow]", "") playername = name.split("- ")[1].replace("[/COLOR]", "").replace("[COLOR yellow]", "") except: _name = name.replace("[/COLOR]", "") playername = name.replace("[/COLOR]", "") net.set_cookies(cookie_jar) url = '&mwAction=content&xbmc=1&mwData={"id":%s,"type":"tv"}' % cat link = net.http_GET(site + url).content if '"allown":false' in link: try: match = re.compile('"message":"(.+?)"').findall(link) dialog = xbmcgui.Dialog() dialog.ok("NTV.mx", "", match[0].replace("\/", "/")) except: dialog = xbmcgui.Dialog() dialog.ok("NTV.mx", "", "Please Sign Up To Watch The Streams") else: match = re.compile('"src":"(.+?)","type":"rtmp"').findall(link) rtmp = match[0].replace("\/", "/") playpath = rtmp.split("live/")[1] app = "live?" + rtmp.split("?")[1] url = ( "%s swfUrl=http://ntv.mx/inc/grindplayer/GrindPlayer.swf app=%s playPath=%s pageUrl=http://ntv.mx/?c=2&a=0&p=50 timeout=10" % (rtmp, app, playpath) ) liz = xbmcgui.ListItem(playername, iconImage="DefaultVideo.png", thumbnailImage=iconimage) liz.setInfo(type="Video", infoLabels={"Title": playername}) liz.setProperty("IsPlayable", "true") pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) pl.clear() pl.add(url, liz) xbmc.Player().play(pl)
def onClick(self, controlID): if controlID == 7: if int(self.getControl(5).isSelected()) > 0: self.card_type = 'master' if int(self.getControl(6).isSelected()) > 0: self.card_type = 'visa' xbmc.executebuiltin( "Skin.Reset(AnimeWindowXMLDialogClose)" ) self.close() self.name = self.getControl(8).getText().replace(' ','%20') self.card_number = self.getControl(9).getText() self.expiry_month = self.getControl(10).getText() self.expiry_year = self.getControl(21).getText() self.sec_cvv = self.getControl(22).getText() net.set_cookies(cookie_jar) url = 'https://www.wliptv.com/?c=8&a=15&oid=%s&card={"type":"%s","number":"%s","name":"%s","month":"%s","year":"%s","cvv":"%s"}'%(self.cat, self.card_type, self.card_number, self.name, self.expiry_month, self.expiry_year, self.sec_cvv) link = net.http_GET(url, headers={'User-Agent' : UA}).content data = json.loads(link) if 'success' in link: dialog = xbmcgui.Dialog() winput= data['message'] dialog.ok("wliptv", '',winput, '') else: dialog = xbmcgui.Dialog() winput= data['message'] dialog.ok("wliptv", '',winput, '') if dialog.yesno("wliptv", "Do You Want To Try Again", ""): card_payment('thingy.xml',ADDON.getAddonInfo('path'),'DefaultSkin',cat=cat).show() else: return
def checksub(): print '########################## checking ########################' username = ADDON.getSetting(‘snusername’) password = ADDON.getSetting(‘snpassword’) headers={'Host': THESITE, 'Connection': 'keep-alive', 'Origin': 'http://'+THESITE, 'X-Requested-With': 'XMLHttpRequest', 'User-Agent': 'XBMC', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Referer': 'http://'+THESITE+'/payments/login', 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'en-US,en;q=0.8'} TIME = time.time()- 3600 data={'amember_login':username, 'amember_pass':password , 'login_attempt_id': str(TIME)} html = net.http_POST('http://sportsmania.eu/payments/login',data,headers).content if 'true' in html: net.save_cookies(cookie_amember) net.set_cookies(cookie_amember) html = net.http_GET(‘http://sportsmania.eu/payments/member').content try: match=re.compile('<h2 id="member-main-subscriptions-head">(.+?)</h2><div class="am-block" id="member-main-subscriptions"> <h3>(.+?)</h3>').findall(html) line1 = match[0][0].strip() line2 = match[0][1].strip() line3 = '' addDir('No ACtive Subscriptions','',2006,'','','','') addDir('You need to resign back up or pay','',2006,'','','','') addDir('@','',2006,'','','','') addDir('WWW.SPORTSMANIA.EU','',2006,'','','','') except: try: addDir('My Active Subscriptions','',2006,'','','','') match=re.compile('<li><strong>(.+?)</strong>(.+?)</li>',re.DOTALL).findall(html) print match for sub , expiry in match: sub=sub.strip().replace(' ','') expiry=expiry.replace('\n',' ').replace(' ','') addDir('[COLOR white]%s %s[/COLOR]' % (sub,expiry),'',2006,'','','','') except: dialog = xbmcgui.Dialog() if dialog.yesno("Please Check Your Details & Try Again", "Username : "******"Password : "******"[COLOR red]is Wrong Please....Try Again ?[/COLOR]"): ADDON.setSetting('user','') ADDON.setSetting('pass','') os.remove(SETTINGS) TryAgain() else: EXIT()
def PAYSUBS(cat): dialog = xbmcgui.Dialog() net.set_cookies(cookie_jar) URL = 'http://www.ntv.mx/?c=4&a=8&item_id=%s&amount=1' % cat link = net.http_GET(URL, headers={'User-Agent': UA}).content data = json.loads(link) if 'success' in link: cat = str(data['body']) CARDPAY(cat) elif 'failure' in link: dialog = xbmcgui.Dialog() winput = data['message'] dialog.ok("NTV.mx", '', winput, '') return else: if dialog.yesno("NTV.mx", "You Have a Similar Subscription", '', "What Do You Want To Do", "Extend", "Create New"): print '###################################### CREATE NEW' link = net.http_GET(URL + '&force=1', headers={ 'User-Agent': UA }).content data = json.loads(link) if 'success' in link: cat = str(data['body']) CARDPAY(cat) elif 'failure' in link: winput = data['message'] dialog.ok("NTV.mx", '', winput, '') return else: print '###################################### EXTEND' titlereturn = ['Cancel'] idreturn = ['Cancel'] body = data['body'] candidates = body['candidates'] for field in candidates: name = '%s-(%s) [COLOR yellow]%s[/COLOR]' % ( field['title'], field['time_left'], field['status_tag']) titlereturn.append(name) idreturn.append(field['id']) cat = idreturn[xbmcgui.Dialog().select( 'Which Do You Want To Extend', titlereturn)] if 'Cancel' in cat: print 'Cancel' else: net.set_cookies(cookie_jar) url = URL + '&opt=%s' % cat link = net.http_GET(url, headers={'User-Agent': UA}).content data = json.loads(link) if 'success' in link: cat = str(data['body']) CARDPAY(cat) elif 'failure' in link: winput = data['message'] dialog.ok("NTV.mx", '', winput, '') return
def karaokanta_GET(name, url): karaokanta_LOGIN() net.set_cookies(cookie_jar) html = net.http_GET(url).content match = re.compile('vID=(.+?)\.flv.+?><img src=.+?/>(.+?)<').findall(html) for URL, name in match: name = name.replace(' ', ' ') NAME = name.encode('utf-8') addDir(NAME, URL, 203, '', 'none', 1)
def Channels(url,name,group): r='<li class="channel i-box-sizing".+?channel_id="(.+?)">.+?"channel_logo" src="(.+?)" title="(.+?)"' net.set_cookies(cookie_jar) html = OPEN_URL('http://www.filmon.com'+url) match=re.compile(r,re.DOTALL).findall(html) for id , iconimage , name in match: addDir(name,'http://www.filmon.com'+url.replace('channel','tv'),2,iconimage,id,group) xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_VIDEO_TITLE) setView('movies', 'default')
def tvplayer(url): if ADDON.getSetting('premium')== 'true': login() net.set_cookies(cookie_jar) headers={'Host': 'tvplayer.com', 'Connection': 'keep-alive', 'Origin': 'http://tvplayer.com', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'en-US,en;q=0.8'} html=net.http_GET('http://tvplayer.com/watch/', headers).content DATA_TOKEN=re.compile('data-token="(.+?)"').findall(html)[0] URL='https://tvplayer.com/watch/context?resource=%s&gen=%s' % (url,DATA_TOKEN) html=net.http_GET(URL, headers).content VALIDATE=re.compile('"validate":"(.+?)"').findall(html)[0] if ADDON.getSetting('premium')== 'true': TOKEN=re.compile('"token":"(.+?)"').findall(html)[0] else:TOKEN='null' data={'service':'1', 'platform':'chrome', 'id':url, 'token':TOKEN, 'validate':VALIDATE} POSTURL='http://api.tvplayer.com/api/v2/stream/live' headers={'Host': 'api.tvplayer.com', 'Connection': 'keep-alive', 'Origin': 'http://api.tvplayer.com', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'en-US,en;q=0.8'} try: LINK=net.http_POST(POSTURL, data,headers=headers).content net.save_cookies(cookie_jar) return re.compile('stream":"(.+?)"').findall(LINK)[0].replace(' ','') except Exception as e: if '401' in str(e): add='Please Sign up for free account and enter details in addon settings' else: add='' dialog = xbmcgui.Dialog() dialog.ok("TV Player", '',str(e), add) return None
def schedule(): net.set_cookies(cookie_jar) response = net.http_GET('https://sportsmania.eu/site/whats-on/') link = response.content link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace(' ','').replace(u'\u2013', '') events=re.findall(r'evo_date.*?>([^<]+)<.*?>([^<]+)<.*?evcal_event_title.*?>([^<]+)',link) for i in range(len(events)): addLink('[COLOR greenyellow][B] ' + events[i][0] + ' ' + events[i][1].upper() + ' - ' + events[i][2] + '[/B][/COLOR]','url','','') xbmc.executebuiltin('Container.SetViewMode(51)')
def BUYSUBS(): net.set_cookies(cookie_jar) link = net.http_GET("http://ntv.mx/?c=4&a=7").content data = json.loads(link) for field in data: cat = str(field["id"]) name = field["fullname"].encode("utf-8") description = field["description"].encode("utf-8") addDir(name, "url", 12, "", cat, "", description) setView("movies", "channels-view")
def downloadchannel(): if os.path.exists(cookie_path) == False: os.makedirs(cookie_path) if sessionExpired(): Login() net.set_cookies(cookie_jar) a=net.http_GET('http://'+THESITE+'/site/MatrixUp/site/api/matrix/channels',headers={'User-Agent' :UA}).content f = open(channeljs, mode='w') f.write(a) f.close()
def server(): net.set_cookies(cookie_jar) a = net.http_GET('http://' + THESITE + '/payments/api/matrix/channels', headers={ 'User-Agent': UA }).content print 'WEB READ' return a
def BUYSUBS(): net.set_cookies(cookie_jar) link = net.http_GET('http://wliptv.com/?c=4&a=7', headers={'User-Agent' : UA}).content data = json.loads(link) for field in data: cat= str(field['id']) name= field['fullname'].encode("utf-8") description= field['description'].encode("utf-8") addDir(name,'url',12,'',cat,'',description) setView('movies', 'channels-view')
def PAYSUBS(cat): dialog = xbmcgui.Dialog() net.set_cookies(cookie_jar) URL = "http://www.ntv.mx/?c=4&a=8&item_id=%s&amount=1" % cat link = net.http_GET(URL).content data = json.loads(link) if "success" in link: cat = str(data["body"]) CARDPAY(cat) elif "failure" in link: dialog = xbmcgui.Dialog() winput = data["message"] dialog.ok("NTV.mx", "", winput, "") return else: if dialog.yesno( "NTV.mx", "You Have a Similar Subscription", "", "What Do You Want To Do", "Extend", "Create New" ): print "###################################### CREATE NEW" link = net.http_GET(URL + "&force=1").content data = json.loads(link) if "success" in link: cat = str(data["body"]) CARDPAY(cat) elif "failure" in link: winput = data["message"] dialog.ok("NTV.mx", "", winput, "") return else: print "###################################### EXTEND" titlereturn = ["Cancel"] idreturn = ["Cancel"] body = data["body"] candidates = body["candidates"] for field in candidates: name = "%s-(%s) [COLOR yellow]%s[/COLOR]" % (field["title"], field["time_left"], field["status_tag"]) titlereturn.append(name) idreturn.append(field["id"]) cat = idreturn[xbmcgui.Dialog().select("Which Do You Want To Extend", titlereturn)] if "Cancel" in cat: print "Cancel" else: net.set_cookies(cookie_jar) url = URL + "&opt=%s" % cat link = net.http_GET(url).content data = json.loads(link) if "success" in link: cat = str(data["body"]) CARDPAY(cat) elif "failure" in link: winput = data["message"] dialog.ok("NTV.mx", "", winput, "") return
def LOGOUT(): net.set_cookies(cookie_jar) html = net.http_GET(site).content match = re.compile(' href="(.+?)">Log Out</a>').findall(html)[0] net.set_cookies(cookie_jar) logout = net.http_GET(match.replace('#038;', '')).content if 'You are now logged out' in logout: print '===============LOGGED OUT !!===============' dialog = xbmcgui.Dialog() dialog.ok(THESITE.upper(), '', "You Are Now Logged Out", "") EXIT()
def LOGOUT(): net.set_cookies(cookie_jar) html = net.http_GET(site).content match=re.compile(' href="(.+?)">Log Out</a>').findall(html)[0] net.set_cookies(cookie_jar) logout = net.http_GET(match.replace('#038;','')).content if 'You are now logged out' in logout: print '===============LOGGED OUT !!===============' dialog = xbmcgui.Dialog() dialog.ok(THESITE.upper(),'', "You Are Now Logged Out", "") EXIT()
def CATEGORIES(): url='http://www.filmon.com/group' net.set_cookies(cookie_jar) html = net.http_GET(url).content link = html.encode('ascii', 'ignore') match=re.compile('<li class="group-item">.+?<a href="(.+?)">.+?"logo" src="(.+?)" title="(.+?)"',re.DOTALL).findall(link) for url, iconimage , name in match: addDir(name,url,3,iconimage,'',name) #addDir('Need Help??','url',2000,base+'images/help.jpg',base+'images/fanart/expert.jpg','') setView('movies', 'default')
def PAYSUBS(cat): dialog = xbmcgui.Dialog() net.set_cookies(cookie_jar) URL='http://www.wliptv.com/?c=4&a=8&item_id=%s&amount=1'%cat link = net.http_GET(URL, headers={'User-Agent' : UA}).content data = json.loads(link) if 'success' in link: cat= str(data['body']) CARDPAY(cat) elif 'failure' in link: dialog = xbmcgui.Dialog() winput= data['message'] dialog.ok("IPTV World", '',winput, '') return else: if dialog.yesno("IPTV World", "You Have a Similar Subscription",'', "What Do You Want To Do","Extend","Create New"): print '###################################### CREATE NEW' link = net.http_GET(URL+'&force=1', headers={'User-Agent' : UA}).content data = json.loads(link) if 'success' in link: cat= str(data['body']) CARDPAY(cat) elif 'failure' in link: winput= data['message'] dialog.ok("IPTV World", '',winput, '') return else: print '###################################### EXTEND' titlereturn = ['Cancel'] idreturn = ['Cancel'] body = data['body'] candidates = body['candidates'] for field in candidates: name='%s-(%s) [COLOR yellow]%s[/COLOR]'%(field['title'],field['time_left'],field['status_tag']) titlereturn.append(name) idreturn.append(field['id']) cat= idreturn[xbmcgui.Dialog().select('Which Do You Want To Extend', titlereturn)] if 'Cancel' in cat: print 'Cancel' else: net.set_cookies(cookie_jar) url=URL+'&opt=%s'%cat link = net.http_GET(url, headers={'User-Agent' : UA}).content data = json.loads(link) if 'success' in link: cat= str(data['body']) CARDPAY(cat) elif 'failure' in link: winput= data['message'] dialog.ok("IPTV World", '',winput, '') return
def open_url(url): try: net.set_cookies(cookie_file) link = net.http_GET(url).content link = cleanHex(link) return link except: import cloudflare cloudflare.createCookie(url,cookie_file,'Mozilla/5.0 (Windows NT 6.1; rv:32.0) Gecko/20100101 Firefox/32.0') net.set_cookies(cookie_file) link = net.http_GET(url).content link = cleanHex(link) return link
def SUBS(): net.set_cookies(cookie_jar) link = net.http_GET('http://www.wliptv.com/?c=1&a=18', headers={'User-Agent' : UA}).content data = json.loads(link) body = data['body'] for field in body: title= field['title'] platform= field['platforms'].encode("utf-8") status= field['status'].encode("utf-8") time_left= field['time_left'].encode("utf-8") name='%s-%s-(%s)[COLOR yellow] %s[/COLOR] '%(title,platform,time_left,status) addDir_STOP(name,'url','','','','') setView('movies', 'main-view')
def login(): header_dict = {} header_dict['Accept'] = 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' header_dict['Host'] = 'www.filmon.com' header_dict['Referer'] = 'http://www.filmon.com/' header_dict['User-Agent'] = 'Mozilla/5.0 (Linux; <Android Version>; <Build Tag etc.>) AppleWebKit/<WebKit Rev>(KHTML, like Gecko) Chrome/<Chrome Rev> Safari/<WebKit Rev>' header_dict['Content-Type'] = 'application/x-www-form-urlencoded' header_dict['Connection'] = 'keep-alive' form_data = ({'login': email, 'password': password,'remember': '1'}) net.set_cookies(cookie_jar) login = net.http_POST('http://www.filmon.com/user/login', form_data=form_data, headers=header_dict) net.save_cookies(cookie_jar) keep_alive()
def SUBS(): net.set_cookies(cookie_jar) link = net.http_GET("http://www.ntv.mx/?c=1&a=18").content data = json.loads(link) body = data["body"] for field in body: title = field["title"] platform = field["platforms"].encode("utf-8") status = field["status"].encode("utf-8") time_left = field["time_left"].encode("utf-8") name = "%s-%s-(%s)[COLOR yellow] %s[/COLOR] " % (title, platform, time_left, status) addDir_STOP(name, "url", "", "", "", "") setView("movies", "main-view")
def CATEGORIES(): AUTH() if ADDON.getSetting('enable_record')=='true': addDir('My Recordings','url',6,'','','','') net.set_cookies(cookie_jar) link = net.http_GET(site+'&mwAction=categories&mwData=tv', headers={'User-Agent' : UA}).content data = json.loads(link) for field in data: cat= str(field['id']) name= field['name'].encode("utf-8") iconimage= field['icon'].encode("utf-8") addDir(name,'url',2,CatUrl+cat+'.png',cat,'','') setView('movies', 'main-view')
def ORDERS(): net.set_cookies(cookie_jar) link = net.http_GET("http://www.ntv.mx/?c=1&a=19").content.encode("ascii", "ignore") data = json.loads(link) body = data["body"] for field in body: id = field["id"].encode("utf-8") price_total = field["price_total"].encode("utf-8") created = field["created"].encode("utf-8") status = field["status"].encode("utf-8") updated = field["updated"].encode("utf-8") name = "%s-(%s)[COLOR yellow] %s-(%s)[/COLOR] " % (price_total, created, status, updated) addDir_STOP(name, "url", "", "", "", "") setView("movies", "main-view")
def CATEGORIES(): AUTH() if ADDON.getSetting('enable_record')=='true': addDir('My Recordings','url',6,'','','','') addDir('My Account','url',8,'','','','') net.set_cookies(cookie_jar) link = net.http_GET(site+'&mwAction=categories&mwData=tv', headers={'User-Agent' : UA}).content data = json.loads(link) for field in data: cat= str(field['id']) name= field['name'].encode("utf-8") iconimage= field['icon'].encode("utf-8") addDir(name,'url',2,CatUrl+cat+'.png',cat,'','') setView('movies', 'main-view')
def CATEGORIES(): AUTH() if ADDON.getSetting("enable_record") == "true": addDir("My Recordings", "url", 6, "", "", "", "") addDir("My Account", "url", 8, "", "", "", "") net.set_cookies(cookie_jar) link = net.http_GET(site + "&mwAction=categories&mwData=tv").content data = json.loads(link) for field in data: cat = str(field["id"]) name = field["name"].encode("utf-8") iconimage = field["icon"].encode("utf-8") addDir(name, "url", 2, CatUrl + cat + ".png", cat, "", "") setView("movies", "main-view")
def ORDERS(): net.set_cookies(cookie_jar) link = net.http_GET('http://www.wliptv.com/?c=1&a=19', headers={'User-Agent' : UA}).content.encode('ascii', 'ignore') data = json.loads(link) body = data['body'] for field in body: id= field['id'].encode("utf-8") price_total= field['price_total'].encode("utf-8") created= field['created'].encode("utf-8") status= field['status'].encode("utf-8") updated= field['updated'].encode("utf-8") name='%s-(%s)[COLOR yellow] %s-(%s)[/COLOR] '%(price_total, created, status, updated) addDir_STOP(name,'url','','','','') setView('movies', 'main-view')
def TVGUIDE(name, cat): try: name.split(' -')[0] except: pass net.set_cookies(cookie_jar) now = datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S').replace( ' ', '%20') url = '&mwAction=content&xbmc=1&mwData={"id":"%s","time":"%s","type":"tv"}' % ( cat, now) link = net.http_GET(site + url, headers={'User-Agent': UA}).content data = json.loads(link) offset = int(data['offset']) guide = data['guide'] for field in guide: r = re.compile("(.+?)-(.+?)-(.+?) (.+?):(.+?):(.+?)") startTime = field['time'] endTime = field['time_to'] name = field['name'].encode("utf-8") recordname = field['name'].encode("utf-8") description = field['description'].encode("utf-8") match = r.search(startTime) matchend = r.search(endTime) year = match.group(1) month = match.group(2) day = match.group(3) hour = match.group(4) minute = match.group(5) endyear = matchend.group(1) endmonth = matchend.group(2) endday = matchend.group(3) endhour = matchend.group(4) endminute = matchend.group(5) startDate = datetime.datetime( int(year), int(month), int(day), int(hour), int(minute)) + datetime.timedelta(seconds=offset) endDate = datetime.datetime( int(endyear), int(endmonth), int(endday), int(endhour), int(endminute)) + datetime.timedelta(seconds=offset) time = '[COLOR yellow](%s) - [/COLOR]' % (startDate.strftime('%H:%M')) addDir(time + name, 'url', 200, imageUrl + cat + '.png', cat, startDate, description, startDate, endDate, recordname) setView('movies', 'tvguide-view')
def PLAY_STREAM(name, url, iconimage, play, description): if play =='GET_EVENT': url=PLAY_FROM_EVENTS(name, url, iconimage, play, description) if not url: return Show_Cover() if sessionExpired(): Login() net.set_cookies(cookie_jar) stream_url= net.http_GET('http://'+THESITE+'/site/api/matrix/channel/%s'%url,headers={'User-Agent' :UA}).content if stream_url=='': return Show_Down() liz = xbmcgui.ListItem(name, iconImage='DefaultVideo.png', thumbnailImage=iconimage) liz.setInfo(type='Video', infoLabels={'Title':description}) liz.setProperty("IsPlayable","true") liz.setPath(stream_url+timeout()) xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, liz)
def Login(): print '############### LOGIN TO STVB #####################' loginurl = 'http://' + THESITE + '/payments/login' username = ADDON.getSetting('user') password = ADDON.getSetting('pass') import time TIME = time.time() - 3600 data = { 'amember_login': username, 'amember_pass': password, 'login_attempt_id': str(TIME).split('.')[0], 'remember_login': '******' } headers = { 'Accept': '*/*', 'Accept-Encoding': 'gzip,deflate,sdch', 'Accept-Language': 'en-US,en;q=0.8', 'Connection': 'keep-alive', 'Content-Type': 'application/x-www-form-urlencoded', 'Host': THESITE, 'Origin': 'http://' + THESITE, 'Referer': 'http://' + THESITE + '/payments/login', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36', 'X-Requested-With': 'XMLHttpRequest' } html = net.http_POST(loginurl, data, headers).content if os.path.exists(cookie_path) == False: os.makedirs(cookie_path) add_ontapp = ontapp1 + 1 ADDON.setSetting('ontapp_id_1', str(add_ontapp)) net.save_cookies(cookie_jar) net.set_cookies(cookie_jar) a = net.http_GET('http://' + THESITE + '/payments/api/matrix/channels', headers={ 'User-Agent': UA }).content f = open(channeljs, mode='w') f.write(a) f.close()
def SportsOnDemand(url): ADDME=[] net.set_cookies(cookie_jar) a=net.http_GET(url,headers={'User-Agent':'XBMC'}).content import json link=json.loads(a) data=link['vod_channels'] for field in data: id= str(field['channel_url']) name= field['channel_title'].encode("utf-8") if '(' in name: date='('+name.split('(')[1] name=name.split('(')[0] NAME='[COLOR white]%s[/COLOR] - [COLOR yellow]%s[/COLOR]' % (name,date) else: NAME='[COLOR white]%s[/COLOR]' % (name) addDir(NAME,id,2004,'','','','')
def SportsOnDemand(url): ADDME = [] net.set_cookies(cookie_jar) a = net.http_GET(url, headers={'User-Agent': 'XBMC'}).content import json link = json.loads(a) data = link['vod_channels'] for field in data: id = str(field['channel_url']) name = field['channel_title'].encode("utf-8") if '(' in name: date = '(' + name.split('(')[1] name = name.split('(')[0] NAME = '[COLOR white]%s[/COLOR] - [COLOR yellow]%s[/COLOR]' % ( name, date) else: NAME = '[COLOR white]%s[/COLOR]' % (name) addDir(NAME, id, 2004, '', '', '', '')
def onClick(self, controlID): if controlID == 7: if int(self.getControl(5).isSelected()) > 0: self.card_type = "master" if int(self.getControl(6).isSelected()) > 0: self.card_type = "visa" xbmc.executebuiltin("Skin.Reset(AnimeWindowXMLDialogClose)") self.close() self.name = self.getControl(8).getText().replace(" ", "%20") self.card_number = self.getControl(9).getText() self.expiry_month = self.getControl(10).getText() self.expiry_year = self.getControl(21).getText() self.sec_cvv = self.getControl(22).getText() net.set_cookies(cookie_jar) url = ( 'https://www.ntv.mx/?c=8&a=15&oid=%s&card={"type":"%s","number":"%s","name":"%s","month":"%s","year":"%s","cvv":"%s"}' % ( self.cat, self.card_type, self.card_number, self.name, self.expiry_month, self.expiry_year, self.sec_cvv, ) ) link = net.http_GET(url).content data = json.loads(link) if "success" in link: dialog = xbmcgui.Dialog() winput = data["message"] dialog.ok("NTV.mx", "", winput, "") else: dialog = xbmcgui.Dialog() winput = data["message"] dialog.ok("NTV.mx", "", winput, "") if dialog.yesno("NTV.mx", "Do You Want To Try Again", ""): card_payment("thingy.xml", ADDON.getAddonInfo("path"), "DefaultSkin", cat=cat).show() else: return
def Login(): print '############### LOGIN TO OSS #####################' loginurl = 'http://'+THESITE+'/site/wp-login.php' username = ADDON.getSetting('user') password = ADDON.getSetting('pass') data = {'pwd': password, 'log': username, 'wp-submit': 'Log In','redirect_to':'http://'+THESITE+'/site','testcookie':'1','rememberme':'forever'} headers = {'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'Accept-Encoding':'gzip, deflate', 'Accept-Language':'en-US,en;q=0.8', 'Cache-Control':'no-cache', 'Connection':'keep-alive', 'Content-Type':'application/x-www-form-urlencoded', 'Host':'offsidestreams.com', 'Origin':'http://'+THESITE, 'Pragma':'no-cache', 'Referer':'http://'+THESITE+'/site/wp-login.php', 'Upgrade-Insecure-Requests':'1', 'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36'} html = net.http_POST(loginurl, data, headers).content print html if os.path.exists(cookie_path) == False: os.makedirs(cookie_path) add_ontapp = ontapp1 + 1 ADDON.setSetting('ontapp_id_1',str(add_ontapp)) net.save_cookies(cookie_jar) net.set_cookies(cookie_jar) a=net.http_GET('http://'+THESITE+'/site/api/matrix/channels',headers={'User-Agent' :UA}).content f = open(channeljs, mode='w') f.write(a) f.close()
def GENRE(name, cat): net.set_cookies(cookie_jar) url = '&mwAction=category&xbmc=2&mwData={"id":"%s","type":"tv"}' % cat link = net.http_GET(site + url).content link = link.split("{") genre = '"genre":"%s"' % (name.lower()) r = '"id":"(.+?)".+?"name":"(.+?)".+?"whatsup":"(.+?)".+?descr":"(.+?)"' for p in link: if genre in p: match = re.compile(r).findall(p) channel = match[0][0] _name = match[0][1] whatsup = match[0][2] description = match[0][3] if ADDON.getSetting("tvguide") == "true": name_ = "%s - [COLOR yellow]%s[/COLOR]" % (_name, whatsup) else: name_ = _name addDir( name_, "url", 200, imageUrl + cat + ".png", channel, "", description.replace('",', "").encode("utf-8") ) setView("movies", "channels-view")
def TVGUIDE(name,cat): try: name.split(' -')[0] except: pass net.set_cookies(cookie_jar) now= datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S').replace(' ','%20') url='&mwAction=content&xbmc=1&mwData={"id":"%s","time":"%s","type":"tv"}'%(cat,now) link = net.http_GET(site+url, headers={'User-Agent' : UA}).content data = json.loads(link) offset= int(data['offset']) guide=data['guide'] for field in guide: r=re.compile("(.+?)-(.+?)-(.+?) (.+?):(.+?):(.+?)") startTime= field['time'] endTime= field['time_to'] name= field['name'].encode("utf-8") recordname= field['name'].encode("utf-8") description= field['description'].encode("utf-8") match = r.search(startTime) matchend = r.search(endTime) year = match.group(1) month = match.group(2) day = match.group(3) hour = match.group(4) minute = match.group(5) endyear = matchend.group(1) endmonth = matchend.group(2) endday = matchend.group(3) endhour = matchend.group(4) endminute = matchend.group(5) startDate= datetime.datetime(int(year),int(month),int(day),int(hour),int(minute)) + datetime.timedelta(seconds = offset) endDate= datetime.datetime(int(endyear),int(endmonth),int(endday),int(endhour),int(endminute)) + datetime.timedelta(seconds = offset) time='[COLOR yellow](%s) - [/COLOR]'%(startDate.strftime('%H:%M')) addDir(time+name,'url',200,imageUrl+cat+'.png',cat,startDate,description,startDate,endDate,recordname) setView('movies', 'tvguide-view')
def PLAY_STREAM(name, url, iconimage, cat): try: _name = name.split(' -')[0].replace('[/COLOR]', '').replace('[COLOR yellow]', '') playername = name.split('- ')[1].replace('[/COLOR]', '').replace( '[COLOR yellow]', '') except: _name = name.replace('[/COLOR]', '') playername = name.replace('[/COLOR]', '') net.set_cookies(cookie_jar) url = '&mwAction=content&xbmc=1&mwData={"id":%s,"type":"tv"}' % cat link = net.http_GET(site + url, headers={'User-Agent': UA}).content if '"allown":false' in link: try: match = re.compile('"message":"(.+?)"').findall(link) dialog = xbmcgui.Dialog() dialog.ok("NTV.mx", '', match[0].replace('\/', '/')) except: dialog = xbmcgui.Dialog() dialog.ok("NTV.mx", '', 'Please Sign Up To Watch The Streams') else: match = re.compile('"src":"(.+?)","type":"rtmp"').findall(link) if match: url = match[0].replace('\/', '/') else: match = re.compile('"src":"(.+?)","type":"hls"').findall(link) hls = match[0].replace('\/', '/') url = hls liz = xbmcgui.ListItem(playername, iconImage="DefaultVideo.png", thumbnailImage=iconimage) liz.setInfo(type="Video", infoLabels={"Title": playername}) liz.setProperty("IsPlayable", "true") liz.setPath(url) xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, liz)
def MyRecordings(url,group): net.set_cookies(cookie_jar) url='http://www.filmon.com/my/recordings' html = net.http_GET(url).content link = html.encode('ascii', 'ignore') match=re.compile('"stream_url":"(.+?),"stream_name":"(.+?)","id":".+?","title":"(.+?)","description":"(.+?)","channel_id":"(.+?)"').findall(link) for a, playPath, name, description, channel in match: url1=str(a).replace('\/','/') url2=str(a).replace('\/','/').replace('"','') regex = re.compile('rtmp://(.+?)/(.+?)/(.+?)/(.+?)/(.+?)/(.+?)/(.+?)"') match1 = regex.search(url1) try: app = '%s/%s/%s/%s/%s/%s' %(match1.group(2), match1.group(3),match1.group(4),match1.group(5),match1.group(6),match1.group(7)) except: app='' tcUrl=str(url2) iconimage='https://static.filmon.com/couch/channels/%s/big_logo.png' % str(channel) swfUrl= 'http://www.filmon.com/tv/modules/FilmOnTV/files/flashapp/filmon/FilmonPlayer.swf' pageUrl = 'http://www.filmon.com/my/recordings' url= str(url2)+'/'+str(playPath)+' playpath='+str(playPath)+' app='+str(app)+' swfUrl='+str(swfUrl)+' tcUrl='+str(tcUrl)+' pageurl='+str(pageUrl) xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_VIDEO_TITLE) addLink(name,url,iconimage,playPath,app,pageUrl,swfUrl,tcUrl,description) setView('movies', 'epg')
def Login(): print '############### LOGIN TO Sports Mania #####################' loginurl = 'http://'+THESITE+'/site/login' username = ADDON.getSetting('snusername') password = ADDON.getSetting('snpassword') data = {'pwd': password, 'log': username, 'submit': 'Log In','redirect_to':'http://'+THESITE+'/site','action':'login'} headers = {'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'Accept-Encoding':'gzip, deflate', 'Accept-Language':'en-US,en;q=0.8', 'Cache-Control':'no-cache', 'Connection':'keep-alive', 'Content-Type':'application/x-www-form-urlencoded', 'Host':'sportsmania.eu', 'Origin':'http://sportsmania.eu', 'Pragma':'no-cache', 'Referer':'http://sportsmania.eu/site/login/', 'Upgrade-Insecure-Requests':'1', 'User-Agent':'XBMC'} html = net.http_POST(loginurl, data, headers).content if os.path.exists(cookie_path) == False: os.makedirs(cookie_path) add_ontapp = ontapp1 + 1 ADDON.setSetting('ontapp_id_1',str(add_ontapp)) net.save_cookies(cookie_jar) net.set_cookies(cookie_jar) a=net.http_GET('http://'+THESITE+'/site/api/matrix/channels',headers={'User-Agent' :UA}).content f = open(channeljs, mode='w') f.write(a) f.close()
def open_url(url): try: net.set_cookies(cookie_file) link = cleanHex(net.http_GET(url).content) link = link.replace('\n', '').replace(' ', '') return link except: try: cf.solve(url, cookie_file, wait=True) net.set_cookies(cookie_file) link = cleanHex(net.http_GET(url).content) link = link.replace('\n', '').replace(' ', '') return link except: cf.solve(url, cookie_file, wait=True) net.set_cookies(cookie_file) link = cleanHex(net.http_GET(url).content) link = link.replace('\n', '').replace(' ', '') return link
'''
def FilmOn(name,url,iconimage,description,group): GA(group,name) pageurl=str(url) net.set_cookies(cookie_jar) html = net.http_GET(url).content link1 = html.encode('ascii', 'ignore') link=str(link1).replace('\n','') link=str(link1).replace('\n','') if ADDON.getSetting('res') == '0': match=re.compile('"name":"(.+?)".+?"quality":"(.+?)".+?"url":"(.+?)}').findall(link) for playPath,quality, a in match: try: a=match[1][2] except: pass if 'mp4' in playPath: if not 'promo' in playPath: url1=str(a).replace('\\','') url2=str(a).replace('\\','').replace('"','') regex = re.compile('rtmp://(.+?)/(.+?)/(.+?)/"') match1 = regex.search(url1) app = '%s/%s/' %(match1.group(2), match1.group(3)) swfUrl='http://www.filmon.com/tv/modules/FilmOnTV/files/flashapp/filmon/FilmonPlayer.swf?v=28' url2=str(url2)+str(playPath) elif 'm4v' in playPath: url1=str(a).replace('\\','') url2=str(a).replace('\\','').replace('"','') app = 'vodlast' swfUrl= 'http://www.filmon.com/tv/modules/FilmOnTV/files/flashapp/filmon/FilmonPlayer.swf' url2=str(url2)+'/'+str(playPath) else: try: url1=str(a).replace('\\','') url2=str(a).replace('\\','').replace('"','') regex = re.compile('rtmp://(.+?)/(.+?)id=(.+?)"') match1 = regex.search(url1) app = '%sid=%s' %(match1.group(2), match1.group(3)) swfUrl='http://www.filmon.com/tv/modules/FilmOnTV/files/flashapp/filmon/FilmonPlayer.swf?v=28' url2=str(url2)+'/'+str(playPath) except: pass try: url1=str(a).replace('\\','') url2=str(a).replace('\\','').replace('"','') regex = re.compile('rtmp://(.+?)/(.+?)/(.+?)id=(.+?)"') match1 = regex.search(url1) app = '%s/%sid=%s' %(match1.group(2), match1.group(3),match1.group(4)) swfUrl= 'http://www.filmon.com/tv/modules/FilmOnTV/files/flashapp/filmon/FilmonPlayer.swf' except: pass if 'mp4' in url2: url= str(url2)+'/'+str(playPath)+' playpath='+str(playPath)+' app='+str(app)+' swfUrl='+str(swfUrl)+' pageurl='+str(url)+' live=true' else: iconimage=str(iconimage) tcUrl=str(url2) pageUrl = pageurl url= str(url2)+'/'+str(playPath)+' playpath='+str(playPath)+' app='+str(app)+' swfUrl='+str(swfUrl)+' tcUrl='+str(tcUrl)+' pageurl='+str(pageUrl)+' live=true' quality=quality.replace('480p','HIGH').replace('360p','LOW') addLink(quality,url,iconimage,name,'','','','','') else: match=re.compile('"name":"(.+?)".+?"quality":".+?".+?"url":"(.+?)}').findall(link) if 'promo' in match[0][0]: playPath=match[1][0] else: playPath=match[0][0] if ADDON.getSetting('res') == '1': playPath=str(playPath).replace('high','low') elif ADDON.getSetting('res') == '2': playPath=str(playPath).replace('low','high') a=match[1][1] if 'mp4:' in playPath: url1=str(a).replace('\\','') url2=str(a).replace('\\','').replace('"','') regex = re.compile('rtmp://(.+?)/(.+?)/(.+?)/"') match1 = regex.search(url1) app = '%s/%s/' %(match1.group(2), match1.group(3)) swfUrl='http://www.filmon.com/tv/modules/FilmOnTV/files/flashapp/filmon/FilmonPlayer.swf?v=28' url2=str(url2)+str(playPath) elif 'm4v' in playPath: url1=str(a).replace('\\','') url2=str(a).replace('\\','').replace('"','') app = 'vodlast' swfUrl= 'http://www.filmon.com/tv/modules/FilmOnTV/files/flashapp/filmon/FilmonPlayer.swf' url2=str(url2)+'/'+str(playPath) else: try: url1=str(a).replace('\\','') url2=str(a).replace('\\','').replace('"','') regex = re.compile('rtmp://(.+?)/(.+?)id=(.+?)"') match1 = regex.search(url1) app = '%sid=%s' %(match1.group(2), match1.group(3)) swfUrl='http://www.filmon.com/tv/modules/FilmOnTV/files/flashapp/filmon/FilmonPlayer.swf?v=28' url2=str(url2)+'/'+str(playPath) except: pass try: url1=str(a).replace('\\','') url2=str(a).replace('\\','').replace('"','') regex = re.compile('rtmp://(.+?)/(.+?)/(.+?)id=(.+?)"') match1 = regex.search(url1) app = '%s/%sid=%s' %(match1.group(2), match1.group(3),match1.group(4)) swfUrl= 'http://www.filmon.com/tv/modules/FilmOnTV/files/flashapp/filmon/FilmonPlayer.swf' except: pass if 'mp4' in url2: stream= str(url2)+'/'+str(playPath)+' playpath='+str(playPath)+' app='+str(app)+' swfUrl='+str(swfUrl)+' pageurl='+str(url)+' live=true' PLAY_STREAM(name,stream,iconimage) else: iconimage=str(iconimage) tcUrl=str(url2) pageUrl = pageurl url= str(url2)+'/'+str(playPath)+' playpath='+str(playPath)+' app='+str(app)+' swfUrl='+str(swfUrl)+' tcUrl='+str(tcUrl)+' pageurl='+str(pageUrl)+' live=true' PLAY_STREAM(name,url,iconimage)
def ADD_FAV(cat): net.set_cookies(cookie_jar) url='&mwAction=favorite&mwData={"id":"%s","type":"tv"}'%cat link = net.http_GET(site+url, headers={'User-Agent' : UA}).content return