示例#1
0
def GETSUPERLINK(referer):
    link = net.http_GET(url).content
    access = net.http_GET('http://www.supercartoons.net/ad-preroll.html')
    playurl = re.compile("file: '(.+?)'").findall(link)[0]
    playurl = playurl + '&pu=' + playurl + '|User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36&Referer=' + referer
    PLAYLINK(name, playurl, iconimage)
    quit()
示例#2
0
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
示例#3
0
def GrabStream(url):
    DOTCOM, THEPAGE, API = GetLang()
    headers = {
        'Host': 'media.mtvnservices.com',
        'User-Agent':
        'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 (.NET CLR 3.5.30729)',
        'Referer': 'http://www.nickjr.%s' % DOTCOM,
        'Connection': 'close',
        'Accept-Encoding': 'gzip, deflate'
    }

    new_url = 'http://media.mtvnservices.com/pmt/e1/access/index.html?uri=mgid:arc:video:nickjr.tv:%s&configtype=edge' % url
    link = net.http_GET(new_url, headers=headers).content

    link = json.loads(link)

    try:
        data = link['feed']['items'][0]['group']['content'] + '&format=json'

        headers = {
            'Host': 'media-utils.mtvnservices.com',
            'User-Agent':
            'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 (.NET CLR 3.5.30729)',
            'Referer': 'http://www.nickjr.%s' % DOTCOM,
            'Connection': 'close',
            'Accept-Encoding': 'gzip, deflate'
        }

        link = net.http_GET(data.replace('{device}', 'iPhone10,3'),
                            headers=headers).content
        link = json.loads(link)

        return link['package']['video']['item'][0]['rendition'][0]['src']
    except:
        return False
示例#4
0
def GETCHANNELS():
    global chname
    global chicon
    global chstream
    global headers
    chname = []
    chicon = []
    chstream = []
    headers = {
        'user-agent':
        'Mozilla/5.0 (Linux; Android 6.0.1; en-GB; SM-G935F Build/MMB29K.G935FXXU1APGG) MXPlayer/1.8.3',
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
        'Accept-Encoding': 'gzip',
        'Connection': 'Keep-Alive'
    }
    api = net.http_GET('http://zona-live-tv.com/zonaapp/api.php?api_key',
                       headers).content
    url = 'http://zona-live-tv.com/zonaapp/api.php?cat_id=14&key=' + re.compile(
        '"key":"(.+?)"').findall(api)[0]
    page = net.http_GET(url, headers).content
    match = re.compile(
        '"channel_title":"(.+?)","channel_url":"(.+?)","channel_thumbnail":"(.+?)"'
    ).findall(page)
    match.sort()
    for name, url, thumb in match:
        if 'zona' in url:
            thumb = 'http://zona-live-tv.com/zonaapp/images/' + thumb + '|User-Agent=Dalvik/2.1.0 (Linux; U; Android 5.1.1; SM-G920F Build/LMY47X)'
            chname.append(name)
            chicon.append(thumb)
            chstream.append(url)
            List.addItem(name)
    window.setFocus(List)
示例#5
0
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
示例#6
0
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
示例#7
0
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 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
示例#9
0
文件: default.py 项目: bialagary/mw
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()
示例#10
0
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
示例#11
0
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()
示例#12
0
def ARTIST_SONG_INDEX(url,name):
        link=net.http_GET(url).content
        match = re.compile('http://www.musictory.com/(.+?)"').findall(link)
        url1 = 'http://www.musictory.com/'+match[0]+'/Songs'
        link1=net.http_GET(url1).content
        url = re.compile('<h1 itemprop="name">(.+?) Songs<').findall(link1)[0]
        match1 = re.compile('<span itemprop="name">(.+?)</span>').findall(link1)
        fanart = art+'Main/Fanart_A.jpg'
        for name in match1:
            name=name.encode('ascii','ignore')
            name = str(name).replace("&Agrave;","A").replace('&eacute;','e').replace('&ecirc;','e').replace('&egrave;','e').replace("&agrave;","A")
            addDir(name,'url',6,iconimage,fanart,1)
        setView('tvshow', 'DEFAULT')
示例#13
0
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
示例#14
0
def ANIMEXDPLAYLINK(name, url, iconimage):
    print 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
    referer = url
    link = net.http_GET(url).content.replace('\r',
                                             '').replace('\n', '').replace(
                                                 '\t', '').replace('  ', '')
    link = cleanHex(link)
    try:
        if 'file:' in link:
            try:
                url = re.compile("file: '(.+?)'").findall(link)[0]
            except:
                url = re.compile('file: "(.+?)"').findall(link)[0]
            print url
            ok = True
            liz = xbmcgui.ListItem(cleanHex(name),
                                   iconImage=iconimage,
                                   thumbnailImage=iconimage)
            liz.setInfo(type="Video", infoLabels={"Title": name})
            ok = xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),
                                             url=url,
                                             listitem=liz)
            xbmc.Player().play(
                url
            )  #+'|User-Agent=Mozilla/5.0 (Windows NT 6.1; rv:32.0) Gecko/20100101 Firefox/32.0', liz, False)
            quit()
    except:
        pass
    if 'safeupload' in link:
        url = re.compile('src="(.+?)" width=').findall(link)
        link = net.http_GET(url).content
        link = cleanHex(link)
    elif 'epCheck' in link:
        match = re.compile('<div class="epCheck ">(.+?)</li>',
                           re.DOTALL).findall(link)
        match = list(reversed(match))
        if 'checkk' in str(match):
            for data in match:
                if 'checkk' in data:
                    match = re.compile('<a href="(.+?)">(.+?)</a>').findall(
                        data)
                    for url, name in match:
                        name = cleanHex(name.replace('&amp;', '&'))
                        addDir(name, url, 20, iconimage, fanart)
        else:
            for data in match:
                match = re.compile('<a href="(.+?)">(.+?)</a>').findall(data)
                for url, name in match:
                    name = cleanHex(name.replace('&amp;', '&'))
                    addDir(name, url, 20, iconimage, fanart)
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
示例#16
0
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 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)
示例#18
0
def GETCHANNELS():
	global chname
	global chlogos
	global chicon
	global chstream
	global headers
	chname=[]
	chlogos=[]
	chicon=[]
	chstream=[]
        headers={'User-Agent':'Dalvik/2.1.0 (Linux; U; Android 5.1.1; SM-G920F Build/LMY47X)',
			 'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8',
			 'Accept-Encoding' : 'gzip',
        		 'Connection':'Keep-Alive'}
        page = net.http_GET ('aHR0cHM6Ly9kbC5kcm9wYm94LmNvbS9zL2RlNGtxcjA4czQ0bDJuei9pZCUzRDE0LnBocA=='.decode('base64'),headers).content
        match=re.compile('"channel_title":"(.+?)","channel_url":"(.+?)","channel_thumbnail":"(.+?)"').findall(page)
        match.sort()
        for name,url,thumb in match:
                if not '\u' in name:
                        thumb='http://proyectoluzdigital.info/tvguia/download/tododeportes/Logos/'+thumb
                        chname.append(name)
                        chicon.append(thumb)
                        chstream.append(url)
                        List.addItem(name)
      	window.setFocus(List)
示例#19
0
def karaokanta_LOGIN():

    loginurl = 'http://www.karaokantalive.com/login.php?action=process'
    username = ADDON.getSetting('karaokantaliveuser')
    password = ADDON.getSetting('karaokantalivepass')

    html = net.http_GET('http://www.karaokantalive.com').content
    formid = re.compile('name="formid" value="(.+?)"').findall(html)[0]
    data = {
        'formid': formid,
        'password': password,
        'email_address': username,
        'submit.x': '0',
        'submit.y': '0'
    }
    headers = {
        'Host': 'www.karaokantalive.com',
        'Origin': 'http://www.karaokantalive.com',
        'Referer': 'http://www.karaokantalive.com'
    }

    html = net.http_POST(loginurl, data, headers).content

    if os.path.exists(cookie_path) == False:
        os.makedirs(cookie_path)
    net.save_cookies(cookie_jar)
示例#20
0
def SportsTVGetLinks(name, url, iconimage):
    hstring = '|User-Agent=%s' % 'hellosamaam'
    headers = {'User-Agent': aua}
    page = net.http_GET(url, headers).content
    links = re.compile('<li><a href="(.+?)" align="center">.+?</a>').findall(
        page)
    if len(links) > 1:
        streamurl = []
        streamname = []
        i = 1
        for url in links:
            streamname.append('Link ' + str(i))
            streamurl.append(url)
            i = i + 1
        select = dialog.select(name, streamname)
        if select == -1: return
        else:
            url = streamurl[select] + hstring
    else:
        url = links[0] + hstring
    ok = True
    liz = xbmcgui.ListItem(name, iconImage=iconimage, thumbnailImage=iconimage)
    liz.setInfo(type="Video", infoLabels={"Title": name})
    ok = xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),
                                     url=url,
                                     listitem=liz)
    xbmc.Player().play(url, liz, False)
    return ok
示例#21
0
文件: default.py 项目: bialagary/mw
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
示例#22
0
def GETSUPER(url):
    referer = url
    domain = 'http://www.supercartoons.net'
    link = net.http_GET(url).content.replace('\n', '')
    if not 'file:' in link:
        match = re.compile('<article class="cartoon col-md-3">(.+?)</article>',
                           re.DOTALL).findall(link)
        for data in match:
            name = re.compile('<h3 class="caption">(.+?)</h3>').findall(
                data)[0].replace('&amp;', '&').replace('&#039;',
                                                       "'").split('<br>')[0]
            url = domain + re.compile('<a href="(.+?)">').findall(data)[0]
            iconimage = domain + re.compile('src="(.+?)"').findall(data)[0]
            if not '20th Century' in name:
                if not 'Filmation' in name:
                    if not 'Paramount' in name:
                        if not 'Universal' in name:
                            if not 'Columbia' in name:
                                addDir(name, url, 3, iconimage, iconimage)
        try:
            np = domain + re.compile('<link rel="next" href="(.+?)">').findall(
                link)[0]
            nextpage = np.split('/')[-1]
            addDir('Next >> Page', np, 3, icon, fanart)
        except:
            pass
    else:
        GETSUPERLINK(referer)
示例#23
0
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)
示例#24
0
def get_packs():

    packs_list = ADDON.getSetting('packs')

    if packs_list and is_token_valid():
        return json.loads(packs_list)

    token = get_token()

    url = 'https://api.tvplayer.com/api/v2/account/get?platform=%s&token=%s' % (
        PLATFORM, token)

    headers = {'User-Agent': USER_AGENT, 'Accept-Encoding': 'gzip'}

    # xbmc.log('PACKS URL: %s' % url)

    response = json.loads(net.http_GET(
        url, headers).content)['tvplayer']['response']

    packs = response['packs']

    packs_list = [int(pack['id']) for pack in packs]

    ADDON.setSetting('packs', json.dumps(packs_list))

    return packs_list
示例#25
0
def SwiftPlayStream(name, url, iconimage):
    if '51.15.47.194:8081' in url:
        tokenurl = selfAddon.getSetting('LiveTvLogin')
        password = selfAddon.getSetting('PasswordLiveTv')
    elif '51.15.57.108:8081' in url:
        tokenurl = selfAddon.getSetting('nexgtvToken')
        password = selfAddon.getSetting('nexgtvPass')
    else:
        tokenurl = selfAddon.getSetting('HelloLogin')
        password = selfAddon.getSetting('PasswordHello')
    passw = 'Basic ' + password
    headers = {
        'Authorization': passw,
        'User-Agent':
        'Dalvik/1.6.0 (Linux; U; Android 4.4.2; SM-G900F Build/KOT49H)',
        'Host': '173.212.202.101'
    }
    token = net.http_GET(tokenurl,
                         headers).content.replace('eMeeea/1.0.0.', '')
    hstring = '|User-Agent=%s' % selfAddon.getSetting('Agent')
    url = url + token + hstring
    ok = True
    liz = xbmcgui.ListItem(name, iconImage=iconimage, thumbnailImage=iconimage)
    liz.setInfo(type="Video", infoLabels={"Title": name})
    ok = xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),
                                     url=url,
                                     listitem=liz)
    xbmc.Player().play(url, liz, False)
    return ok
示例#26
0
def resolve(url):
    import net
    net = net.Net()
    web_url = url
    html = net.http_GET(web_url).content
    data = {}
    r = re.findall(r'type="hidden"\s+name="(.+?)"\s+value="(.*?)"', html)
    if r:
        for name, value in r:
            data[name] = value
    import captcha_lib
    data['method_free'] = 'Free Download'
    data.update(captcha_lib.do_captcha(html))
    html = net.http_POST(web_url, data).content
    data = {}
    r = re.findall(r'type="hidden"\s+name="(.+?)"\s+value="(.*?)"', html)
    if r:
        for name, value in r:
            data[name] = value
    data['referer'] = web_url
    headers = {
        'User-Agent':
        'Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36'
    }
    request = urllib2.Request(web_url,
                              data=urllib.urlencode(data),
                              headers=headers)
    try:
        stream_url = urllib2.urlopen(request).geturl()
    except:
        return
    return stream_url
示例#27
0
文件: default.py 项目: noba3/KoTos
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)
示例#28
0
def login_api():
    ADDON.setSetting('email_token', '')
    ADDON.setSetting('access_token', '')
    ADDON.setSetting('access_token_expires', '')

    email = ADDON.getSetting('email')
    password = ADDON.getSetting('password')

    loginUrl = 'https://api.tvplayer.com/api/v2/auth/?platform=' + PLATFORM

    headers = {
        'Authorization':
        'Basic ' + base64.b64encode('%s:%s' % (email, password)),
        'User-Agent': USER_AGENT,
        'Accept-Encoding': 'gzip'
    }

    login_response = json.loads(net.http_GET(
        loginUrl, headers).content)['tvplayer']['response']

    access_token = login_response['access_token']
    access_token_expires = login_response['expires']

    ADDON.setSetting('email_token', email)
    ADDON.setSetting('access_token', access_token)
    ADDON.setSetting('access_token_expires', access_token_expires)

    return access_token, access_token_expires
示例#29
0
文件: movreel.py 项目: bialagary/mw
def solve(url):
    html = net.http_GET(url)
    import time
    time.sleep(2)
    html = html.content
    postData = {}
    for item in re.finditer(r'\"\sname\=\"(.*?)\"\svalue=\"?(.*?)\"', html,
                            re.I):
        postData.update({str(item.group(1)): str(item.group(2))})

    if postData:
        URL = net.http_POST(
            url,
            postData,
            headers={
                'Content-Type':
                'application/x-www-form-urlencoded',
                'Referer':
                str(url),
                'Origin':
                'http://movreel.com',
                'Accept':
                'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8'
            }).content

        LINK = URL.split('<a href')
        for p in LINK:
            d = p.split('<')[0]
            if 'download link' in d.lower():
                finalLink = re.compile('="(.+?)"').findall(d)[0]

                if finalLink:
                    return finalLink
示例#30
0
def GENRESF(url):
        link=net.http_GET('http://www.sunflykaraoke.com/genre').content.encode('ascii','ignore')
        match=re.compile('class="thumb_img">.+?<img src="(.+?)".+?href="(.+?)">(.+?)</a>',re.DOTALL).findall(link)
        for iconimage,url , name in match:
            addDir(name,url+'?dir=asc&limit=200&order=latestalbums',33,iconimage,art+'Main/Fanart_G.jpg',1) 
        
        setView('movies', 'GENRE')
示例#31
0
文件: default.py 项目: umonkey13/repo
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')         
示例#32
0
文件: default.py 项目: umonkey13/repo
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
示例#33
0
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')         
示例#34
0
def resolve(url):
        import net
        net = net.Net()
        web_url = url
        html = net.http_GET(web_url).content
        data = {}
        r = re.findall(r'type="hidden"\s+name="(.+?)"\s+value="(.*?)"', html)
        if r:
            for name, value in r:
                data[name] = value
        import captcha_lib
        data['method_free'] = 'Free Download'
        data.update(captcha_lib.do_captcha(html))
        html = net.http_POST(web_url, data).content
        data = {}
        r = re.findall(r'type="hidden"\s+name="(.+?)"\s+value="(.*?)"', html)
        if r:
            for name, value in r:
                data[name] = value
        data['referer'] = web_url
        headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36' }
        request = urllib2.Request(web_url, data=urllib.urlencode(data), headers=headers)
        try: stream_url = urllib2.urlopen(request).geturl()
        except: return
        return stream_url
示例#35
0
 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
示例#36
0
def EPISODES2(name,url,iconimage):
        imgid=url
        link = net.http_GET('http://api.animetoon.tv/GetDetails/'+url,headers=header).content
        id2 = re.compile('"id":"(.+?)"').findall(link)#THERE IS MORE THAN 1 ID
        foundnames=[]
        for num in id2:      
                links = net.http_GET('http://api.animetoon.tv/GetVideos/'+num+'\?direct',headers=header).content
                plinks = re.compile('"filename":"(.+?)","link":"(.+?)"').findall(links)
                for name,url in plinks:
                        url = url.replace('\/','/')
                        name=name.replace('_',' ').replace('.mp4','').replace('at ','').title()
                        if name in foundnames:
                                name = name+"[COLOR yellow][I] (version 2)[/COLOR][/I]"
                        iconimage = 'http://www.animetoon.tv/images/series/big/'+imgid+'.jpg'
                        foundnames.append(name)
                        addLink(name,url,2,iconimage,fanart)
示例#37
0
文件: default.py 项目: umonkey13/repo
 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
示例#38
0
def Find_A_Team():
        
    keyboard = xbmc.Keyboard('', 'Type Exact Team Name !')
    keyboard.doModal()
    if keyboard.isConfirmed():
        search_entered = keyboard.getText()

    
    link=net.http_GET('http://footballfullmatch.com/search/'+search_entered.lower().replace(' ','+') , headers={'User-Agent':'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'}).content
    
    if link != False:
        r= '<div class="post-thumb"><a href="(.+?)" title="(.+?) vs (.+?)">\n.+?src="(.+?)"' 
        #r='<div class="cover"><a href="(.+?)" rel="bookmark" title="(.+?) vs (.+?)".+?<img src="(.+?)".+? longdate" rel=".+?">(.+?)/(.+?)/(.+?)</p>'
        match=re.compile(r).findall(link)
        cat = search_entered.lower()
        currentday = re.compile('"currentday":"(.+?)"').findall(link)[0]
        for url,team_a,team_b,iconimage in match:
            if '?' in iconimage:
                    iconimage=iconimage.split('?')[0]
                    
            _name = '[COLOR ghostwhite]'+team_a+'[/COLOR]  [COLOR deepskyblue]vs[/COLOR]  [COLOR ghostwhite]'+team_b+'[/COLOR]'
            addDir(_name,url,1,iconimage,'')
        addDir('[COLOR deepskyblue]Next Page[/COLOR] [COLOR ghostwhite]>>[/COLOR]','url',2,'',cat+'#'+currentday+'#1')
        setView('movies', 'movie-view')

    else:
        Show_Red_Flag()
示例#39
0
def Episodes(url, page):
    page = int(page) + 1
    DOTCOM, THEPAGE, API = GetLang()
    headers = {
        'Referer':
        'http://www.nickjr.%s' % DOTCOM,
        'User-Agent':
        'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 (.NET CLR 3.5.30729)'
    }
    link = net.http_GET(
        'http://www.nickjr.%s/data/property%s.json?&urlKey=%s&apiKey=%s&page=%s'
        % (DOTCOM, THEPAGE, url, API, page),
        headers=headers).content

    link = json.loads(link)
    data = link['stream']
    for k in data:
        for w in k['items']:
            try:
                try:
                    URL = w['data']['id']
                except:
                    URL = None
                try:
                    duration = ' - [' + w['data']['duration'] + ']'
                except:
                    duration = ''
                try:
                    name = w['data']['title'] + duration
                except:
                    try:
                        name = htmlcleaner.cleanUnicode(
                            w['data']['title']) + duration
                    except:
                        try:
                            name = htmlcleaner.clean(
                                w['data']['title']) + duration
                        except:
                            name = ''
                try:
                    iconimage = w['data']['images']['thumbnail']['r1-1']
                except:
                    try:
                        iconimage = w['data']['images']['thumbnail']['r25-12']
                    except:
                        iconimage = ''

                try:
                    plot = htmlcleaner.cleanUnicode(w['data']['description'])
                except:
                    plot = ''

                if URL:
                    addDir(name, URL, 200, iconimage, plot)
            except:
                pass
    if data:
        addDir('Next Page >>', url, 1, '', str(page))
    setView('movies', 'episode-view')
示例#40
0
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()
示例#41
0
def ARTIST_INDEX(url, iconimage):
    link = net.http_GET(url).content.encode('ascii', 'ignore')
    match = re.compile('<a href="(.+?)" title="(.+?)"').findall(link)
    for url, name in match:
        url = 'http://www.lyricsmania.com' + url
        name = str(name).replace("lyrics", "")
        addDir(name, url, 5, iconimage, art + 'Main/Fanart_A.jpg', 1)
    setView('movies', 'DEFAULT')
示例#42
0
def MGLIST_UPDATE():
  global url  
  try:
    if window.getFocus() == MGlist:
        pos=MGlist.getSelectedPosition()
        link = net.http_GET('https://copy.com/SwKjJnQaTBd63NZa/wizard.txt?download=1').content.replace('\n','').replace('\r','')
        MGimage = re.compile('img="(.+?)"').findall(link)[pos]
        MGthumb.setImage(MGimage)
        url = re.compile('url="(.+?)"').findall(link)[pos]
        name = re.compile('name="(.+?)"').findall(link)[pos]
        buildtextbox.setLabel(name)
        MGlist.controlRight(InstallButton)#Specific Window Control
        InstallButton.controlLeft(MGlist)#Specific Window Control
    elif window.getFocus() == worldlist:
        pos=worldlist.getSelectedPosition()
        link = net.http_GET('https://copy.com/fVTVDkgpr8K4zlCY/addon_data.txt?download=1').content.replace('\n','').replace('\r','')
        worldimage = re.compile('img="(.+?)"').findall(link)[pos]
        MGthumb.setImage(worldimage)
        url = re.compile('url="(.+?)"').findall(link)[pos]
        name = re.compile('name="(.+?)"').findall(link)[pos]
        buildtextbox.setLabel(name)
        worldlist.controlRight(InstallButton)#Specific Window Control
        InstallButton.controlLeft(worldlist)#Specific Window Control
    elif window.getFocus() == comlist:
        pos=comlist.getSelectedPosition()
        link = net.http_GET('https://copy.com/SwKjJnQaTBd63NZa/wizard.txt?download=1').content.replace('\n','').replace('\r','')
        comimage = re.compile('img="(.+?)"').findall(link)[pos]
        MGthumb.setImage(comimage)
        url = re.compile('url="(.+?)"').findall(link)[pos]
        name = re.compile('name="(.+?)"').findall(link)[pos]
        buildtextbox.setLabel(name)
        comlist.controlRight(InstallButton)#Specific Window Control
        InstallButton.controlLeft(comlist)#Specific Window Control  
    elif window.getFocus() == comlist2:
        pos=comlist2.getSelectedPosition()
        name=com2name[pos]
        url=com2url[pos]
        thumb=com2thumb[pos]
        MGthumb.setImage(thumb)
        name = '[COLOR grey]'+name+'[/COLOR]'
        buildtextbox.setLabel(name)
        comlist2.controlRight(InstallButton)#Specific Window Control
        InstallButton.controlLeft(comlist2)#Specific Window Control
    else:pass
  except:pass
示例#43
0
def EPISODES1(name,url,iconimage):
        link=net.http_GET(url,headers=header).content
        data=json.loads(link)
        for item in data:
                name=cleanHex(item['name'])
                id=cleanHex(item['id'])
                description=cleanHex(item['description'])
                iconimage = 'http://www.animetoon.tv/images/series/big/'+item['id']+'.jpg'
                addDir(name,id,3,iconimage,fanart,description)
示例#44
0
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('&nbsp;', ' ')
        NAME = name.encode('utf-8')
        addDir(NAME, URL, 203, '', 'none', 1)
示例#45
0
def GET3RDPARTY(url):
    link = net.http_GET(url).content.replace('\n','').replace('\r','')
    match = re.compile('name="(.+?)".+?rl="(.+?)".+?mg="(.+?)".+?anart="(.+?)".+?escription="(.+?)"').findall(link)
    name = '';iconimage = '';fanart = '';description = ''   
    for name,url,iconimage,fanart,description in match:
        name = '[COLOR red]'+name+'[/COLOR]'
        addLink(name,url,1,iconimage,fanart,description)
    xbmcplugin.addSortMethod(int(sys.argv[1]), 1)
    xbmc.executebuiltin('Container.SetViewMode(500)')
示例#46
0
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('&nbsp;','').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)')
示例#47
0
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') 
示例#48
0
def GETFORUMBUILDS():
    response = net.http_GET('http://www.xbmckodiaddons.com/?forum=468019')
    link = cleanHex(response.content)
    match = re.compile('<a href="(.+?)" title=".+?" class="thread_title">(.+?)</a>').findall(link)
    for url,name in match:
      try:
        if '[Release]' in name:
            print name
            name = name.replace("[Release]","")
            url='http://www.xbmckodiaddons.com'+url
            response = net.http_GET(url).content
            thumb = 'http://wookiespmc.com/Updates/images/xbmckodiaddons.png'
            url = re.compile('url="(.+?)"').findall(response)[0]
            url = url.replace('amp;','')
            thumb = re.compile('img="(.+?)"').findall(response)[0]
            thumb = thumb.replace('amp;','')
            addLink(name,url,1,thumb,fanart,name)
      except:pass  
    xbmc.executebuiltin('Container.SetViewMode(500)')
示例#49
0
文件: default.py 项目: bialagary/mw
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  
示例#50
0
def open_url(url):
	try:
	    net.set_cookies(cookie_file)
	    link = net.http_GET(url).content
	    link=cleanHex(link)
	    return link
	except:
	  try:
	    cf.solve(url,cookie_file,wait=True)
	    net.set_cookies(cookie_file)
	    link = net.http_GET(url).content
	    link=cleanHex(link)
	    return link
	  except:
	    cf.solve(url,cookie_file,wait=True)
	    net.set_cookies(cookie_file)
	    link = net.http_GET(url).content
	    link=cleanHex(link)
	    return link 
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")
示例#52
0
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
示例#53
0
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()
示例#54
0
文件: default.py 项目: msports/mw
def anime(url):
    link=net.http_GET(url).content
    if '>File was deleted<' in link:
        return Show_Dialog()
    URL=[]
    NAME=[]

    match=re.compile('"file" : "(.+?)".+?"label" : "(.+?)"',re.DOTALL).findall(link)
    for urls , res in match:
        URL.append(urls)
        NAME.append(res.replace('o','')+'P')
    return URL[xbmcgui.Dialog().select('Please Select Resolution', NAME)]
示例#55
0
def CATEGORIES():
    link = net.http_GET('http://wookiespmc.com/Updates/wizard_txt/wookie.txt').content.replace('\n','').replace('\r','')
    match = re.compile('name="(.+?)".+?rl="(.+?)".+?mg="(.+?)".+?anart="(.+?)".+?escription="(.+?)"').findall(link)
    name = '';iconimage = '';fanart = '';description = ''   
    for name,url,iconimage,fanart,description in match:
        name = '[COLOR red]'+name+'[/COLOR]'
        if 'Section' in name:
            if not 'Build' in name:
                addDir(name,url,1,iconimage,fanart,description)
        else:
            addLink(name,url,1,iconimage,fanart,description)
    addDir('[COLOR red]Community Builds[/COLOR]','url',2,'http://wookiespmc.com/Updates/images/communitybuilds.jpg',fanart,description)
    xbmc.executebuiltin('Container.SetViewMode(500)')
示例#56
0
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')         
示例#57
0
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')