• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python net.http_GET函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中net.http_GET函数的典型用法代码示例。如果您正苦于以下问题:Python http_GET函数的具体用法?Python http_GET怎么用?Python http_GET使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了http_GET函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: LOGIN_VK

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
开发者ID:c0ns0le,项目名称:YCBuilds,代码行数:25,代码来源:default.py


示例2: PAYSUBS

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
开发者ID:neopack1,项目名称:Aarron-Lee-XBMC-Repo-Oficial,代码行数:55,代码来源:default.py


示例3: PAYSUBS

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
开发者ID:exp-repo,项目名称:exp-repo,代码行数:54,代码来源:default.py


示例4: LOGOUT

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()
开发者ID:browno01,项目名称:sportmania-1,代码行数:11,代码来源:default.py


示例5: open_url

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
开发者ID:kevintone,项目名称:tdbaddon,代码行数:13,代码来源:default.py


示例6: server

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
开发者ID:bialagary,项目名称:mw,代码行数:7,代码来源:default.py


示例7: PLAY_STREAM

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)
开发者ID:noba3,项目名称:KoTos,代码行数:34,代码来源:default.py


示例8: GETCHANNELS

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)
开发者ID:kodiline,项目名称:repository.Play-Mix-EVO,代码行数:25,代码来源:default.py


示例9: PLAY_STREAM

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)
开发者ID:neopack1,项目名称:Aarron-Lee-XBMC-Repo-Oficial,代码行数:35,代码来源:default.py


示例10: CARDDETAILS

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
开发者ID:neopack1,项目名称:Aarron-Lee-XBMC-Repo-Oficial,代码行数:29,代码来源:default.py


示例11: resolve

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
开发者ID:c0ns0le,项目名称:YCBuilds,代码行数:25,代码来源:default.py


示例12: EPISODES2

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)
开发者ID:anotherthief,项目名称:MetalKettles-Addon-Repository,代码行数:16,代码来源:default.py


示例13: GENRE

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')         
开发者ID:exp-repo,项目名称:exp-repo,代码行数:35,代码来源:default.py


示例14: CARDDETAILS

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
开发者ID:exp-repo,项目名称:exp-repo,代码行数:26,代码来源:default.py


示例15: onClick

 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
开发者ID:exp-repo,项目名称:exp-repo,代码行数:32,代码来源:default.py


示例16: checksub

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 : "+ADDON.getSetting('user'), "Password : "+ ADDON.getSetting('pass'), "[COLOR red]is Wrong Please....Try Again ?[/COLOR]"):
                 ADDON.setSetting('user','')
                 ADDON.setSetting('pass','')
                 os.remove(SETTINGS)

                 TryAgain()
             else:
                EXIT()
开发者ID:browno01,项目名称:sportmania-1,代码行数:59,代码来源:default.py


示例17: MGLIST_UPDATE

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
开发者ID:MGArabic,项目名称:repository.MG.Arabic,代码行数:45,代码来源:default.py


示例18: GET3RDPARTY

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)')
开发者ID:c0ns0le,项目名称:YCBuilds,代码行数:9,代码来源:default.py


示例19: EPISODES1

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)
开发者ID:anotherthief,项目名称:MetalKettles-Addon-Repository,代码行数:9,代码来源:default.py


示例20: schedule

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)')
开发者ID:browno01,项目名称:sportmania-1,代码行数:9,代码来源:default.py



注:本文中的net.http_GET函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python net.set_cookies函数代码示例发布时间:2022-05-27
下一篇:
Python net.get_hostname函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap