当前位置: 首页>>代码示例>>Python>>正文


Python Net.http_POST方法代码示例

本文整理汇总了Python中entertainment.net.Net.http_POST方法的典型用法代码示例。如果您正苦于以下问题:Python Net.http_POST方法的具体用法?Python Net.http_POST怎么用?Python Net.http_POST使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在entertainment.net.Net的用法示例。


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

示例1: GetFileHostsForContent

# 需要导入模块: from entertainment.net import Net [as 别名]
# 或者: from entertainment.net.Net import http_POST [as 别名]
    def GetFileHostsForContent(self, title, name, year, season, episode, type, list, lock, message_queue):                 
        
        from entertainment.net import Net
        import re
        net = Net(cached=False)

        tv_user = self.Settings().get_setting('tv_user')
        tv_pwd = self.Settings().get_setting('tv_pwd')
            

        if os.path.exists(self.cookie_file):
                try: os.remove(self.cookie_file)
                except: pass
                
        headers = {'Content-Type': 'application/x-www-form-urlencoded',
                   'Connection': 'keep-alive', 'Cache-Control': 'max-age=0',
                   'Host': 'www.einthusan.com', 'Origin': 'http://www.einthusan.com',
                   'Referer': 'http://www.einthusan.com/index.php?lang=hindi',
                   'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36'}


        net.http_GET('http://www.einthusan.com/etc/login.php')
        net.http_POST('http://www.einthusan.com/etc/login.php', {'username': str(tv_user), 'password': str(tv_pwd)}, headers, auto_read_response=False).content
        net.save_cookies(self.cookie_file)
        net.set_cookies(self.cookie_file)  
                                
        name = self.CleanTextForSearch(name)
        
        import urllib
        
        movie_url=self.GoogleSearchByTitleReturnFirstResultOnlyIfValid('einthusan.com', name, 'watch.php', item_count=10, title_extrctr='(.+?) (?:Hindi|hindi|Tamil|tamil|Telugu|telugu|Malayalam|malayalam) movie')
        if movie_url:
            self.GetFileHosts(movie_url, list, lock, message_queue)
开发者ID:bialagary,项目名称:mw,代码行数:35,代码来源:einthusan_mvi_mvs_cst.py

示例2: GetFileHosts

# 需要导入模块: from entertainment.net import Net [as 别名]
# 或者: from entertainment.net.Net import http_POST [as 别名]
    def GetFileHosts(self, url, list, lock, message_queue,name): 
        
        import re,json
        
        from entertainment.net import Net

        net = Net(cached=False)
        content = net.http_GET(url).content
        links=re.compile('pic=([^&]+)').findall (content)
        links = [x for y,x in enumerate(links) if x not in links[:y]]

        for i in links:

            data = {'url': i, 'fv': '16'}
            headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36'}
            html=   net.http_POST('http://yify.tv/player/pk/pk/plugins/player_p2.php',data,headers=headers).content
            result = json.loads(html)     
            for field in result:

                     if field['width']== 1920:
                         url = field['url']
                         res= '1080P'
                         host=url.split('://')[1]
                         host=host.split('/')[0].replace('www','')
                         self.AddFileHost(list, res, url,host=host.upper())
                     if field['width']== 1280:
                         url = field['url']
                         res= '720P'
                         host=url.split('://')[1]
                         host=host.split('/')[0].replace('www','')                       
                         self.AddFileHost(list, res, url,host=host.upper())
开发者ID:bialagary,项目名称:mw,代码行数:33,代码来源:yify_mvs.py

示例3: login

# 需要导入模块: from entertainment.net import Net [as 别名]
# 或者: from entertainment.net.Net import http_POST [as 别名]
 def login(self):
     
     headers={'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25',
              'Host':'ororo.tv',
              'Pragma':'no-cache',
              'Referer':'http://ororo.tv/en',
              'Upgrade-Insecure-Requests':'1',
              'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
              'Accept-Encoding':'gzip, deflate, sdch',
              'Accept-Language':'en-US,en;q=0.8',
              'Cache-Control':'no-cache',
              'Connection':'keep-alive'}
     tv_user = self.Settings().get_setting('tv_user')
     tv_pwd = self.Settings().get_setting('tv_pwd')        
     from entertainment.net import Net
     
     net = Net(cached=False,user_agent='Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25')
     
     tries = 0
     while True:
         html = html = net.http_GET('http://ororo.tv/nl/',headers=headers).content
         if html.startswith('http://') and tries < MAX_REDIRECT:
             tries += 1
             url = html
         else:
             break
     
     data = {'user[email]': tv_user, 'user[password]': tv_pwd, 'user[remember_me]': 1}
     html = net.http_POST('http://ororo.tv/en/users/sign_in',data,headers=headers).content
     net.save_cookies(self.cookie_file)
开发者ID:bialagary,项目名称:mw,代码行数:32,代码来源:ororo_mvi_tvi_mvs_tvs_cst.py

示例4: Resolve

# 需要导入模块: from entertainment.net import Net [as 别名]
# 或者: from entertainment.net.Net import http_POST [as 别名]
    def Resolve(self, url):
        print url
        import re        
        from entertainment.net import Net
        net = Net(cached=False,user_agent='Apple-iPhone/')
        tv_user = self.Settings().get_setting('tv_user')
        tv_pwd = self.Settings().get_setting('tv_pwd')
        loginurl = 'http://hdtvshows.net/reg.php'
        html = net.http_GET(loginurl).content
        match=re.compile('name="Token(.+?)" value="(.+?)"').findall(html)
        _Token=re.compile('name="data\[\_Token\]\[fields\]" value="(.+?)"').findall(html)[0]
        data     = {'_method':'POST','subscriptionsPass': tv_pwd,
                                            'UserUsername': tv_user,
                                            'Token'+match[0][0]:'login','data[_Token][fields]':_Token}
        headers  = {'Host':'hdtvshows.net',
                                            'Origin':'http://hdtvshows.net',
                                            'Referer':'http://hdtvshows.net/login.php',
                                                    'X-Requested-With':'XMLHttpRequest'}
        html = net.http_POST(loginurl, data, headers)
        cookie_jar = os.path.join(cookie_path, "hdtvshows.lwp")
        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(url).content
        

        match=re.compile('<video id="ipadvideo" src="(.+?)"').findall(html)
        
        
        
        return  match[0].replace('|','%7C')
开发者ID:bialagary,项目名称:mw,代码行数:34,代码来源:hdtvshows_tvs.py

示例5: Resolve

# 需要导入模块: from entertainment.net import Net [as 别名]
# 或者: from entertainment.net.Net import http_POST [as 别名]
    def Resolve(self, url):
        import re        
        from entertainment.net import Net
        
        episode=url.split('|')[1]
        url=url.split('|')[0]


        net = Net(do_not_cache_if_any=do_no_cache_keywords_list)
        headers={'Referer':'http://www.kissdrama.net/results.php', 'X-Requested-With':'XMLHttpRequest','Content-Type':'application/x-www-form-urlencoded; charset=UTF-8'}
        key = url.split('=')[1]

        form_data={ 'c':'result', 'a':'getplayerinfo', 'p':'{"KeyWord":"%s","Episode":%s,"Part":"01"}' % (key,episode) }
        content = net.http_POST('http://www.kissdrama.net/index.php', form_data, headers).content
        
        match=re.compile('src="http(.+?)"').findall(content)[0]
        
        if 'docs.google.com' in match:
            match='http'+match
            headers={'Referer':str(match), 'Host':'docs.google.com','User-Agent':'Mozilla/5.0 (Windows NT 6.1; rv:27.0) Gecko/20100101 Firefox/27.0','Connection':'keep-alive','Accept-Encoding':'gzip, deflate','Accept-Language':'en-US,en;q=0.5','Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'}
            
            html = net.http_GET(match, headers=headers).content.encode("utf-8").rstrip()
            video_url=re.search('fmt_stream_map".+?(http.+?),', html).group(1)
            video_url=video_url.replace('|', '').replace('\u003d','=').replace('\u0026','&')

            return video_url

        else:
            match='http'+match
            return match
开发者ID:bialagary,项目名称:mw,代码行数:32,代码来源:kissdrama_tvs.py

示例6: GetFileHosts

# 需要导入模块: from entertainment.net import Net [as 别名]
# 或者: from entertainment.net.Net import http_POST [as 别名]
    def GetFileHosts(self, id, other_names, region, language, list, lock, message_queue):

        search_term = id
        
        from entertainment.net import Net
        net = Net(cached=False)
                
        user = self.Settings().get_setting('user')
        pwd = self.Settings().get_setting('pwd')
        if user and pwd:
            
            content = net.http_POST('http://www.filmon.com/user/login', {'login':user, 'password':pwd, 'remember':'1'}, 
                headers={'Referer':self.base_url}).content
                
            net.save_cookies(self.cookie_file)

        
        content = net.http_GET(self.base_url).content.encode("utf-8")
        link = content.split('{"id":')
        import re
        for p in link:            
            if '"filmon_' in p: 
                title=p.split('"title":"')[1]
                ITEM_TITLE=title.split('"')[0]
                p_id = common.CreateIdFromString( common.CleanTextForSearch(ITEM_TITLE, strip=True) )
                if id == p_id or p_id in other_names :
                    channel_id=p.split(',')[0]
                    res=['SD','HD']
                    for quality in res:
                        channel_id_with_quality=channel_id + '__' + quality
                        self.AddLiveLink( list, ITEM_TITLE, channel_id_with_quality, language = language.title(),host='FILMON',quality=quality)
                    break
开发者ID:bialagary,项目名称:mw,代码行数:34,代码来源:filmon_ltvs_cst.py

示例7: GetFileHostsForContent

# 需要导入模块: from entertainment.net import Net [as 别名]
# 或者: from entertainment.net.Net import http_POST [as 别名]
    def GetFileHostsForContent(self, title, name, year, season, episode, type, list, lock, message_queue):                 
        new_url = 'http://www.movie-tube.co/index.php'
        import re
        from entertainment.net import Net
        
        net = Net(do_not_cache_if_any=do_no_cache_keywords_list)
        
        if os.path.exists(self.cookie_file):
                try: os.remove(self.cookie_file)
                except: pass
                
        headers={'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36','Origin':'http://www.movie-tube.co','Referer':'http://www.movie-tube.co','Host':'www.movie-tube.co', 'X-Requested-With':'XMLHttpRequest','Content-Type':'application/x-www-form-urlencoded; charset=UTF-8'}

        title = self.CleanTextForSearch(title) 
        name = self.CleanTextForSearch(name)

        form_data={'query':name}
        content = net.http_POST('http://www.movie-tube.co/engine/ajax/search.php', form_data, headers).content


           
        
        match=re.compile('href="(.+?)"><span class="searchheading">(.+?)</',re.DOTALL).findall(content)


        for url,TITLE in match:
            if name in TITLE:
                self.GetFileHosts(url, list, lock, message_queue)
开发者ID:bialagary,项目名称:mw,代码行数:30,代码来源:movietube_mvs.py

示例8: GetFileHosts

# 需要导入模块: from entertainment.net import Net [as 别名]
# 或者: from entertainment.net.Net import http_POST [as 别名]
    def GetFileHosts(self, url, list, lock, message_queue):

        import re,urllib
        from entertainment.net import Net
        
        net = Net(user_agent='Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_2 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5')
                  

        loginurl = 'https://m.genvideos.org/video_info/html5'
        
        v=url.split('v=')[1]
        data={'v': v}
        headers = {'host': 'm.genvideos.org','origin':'https://m.genvideos.org', 'referer': url,
                   'user-agent':'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_2 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5','x-requested-with':'XMLHttpRequest'}

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

        import json

        link= json.loads(first)

        for j in link:
            quality = j.upper()
            if '360P' in quality:
                quality='SD'
                
            THEURL = urllib.unquote(link[j][3])+'**'+url
            self.AddFileHost(list, quality, THEURL,host='GOOGLEVIDEO.COM')
开发者ID:bialagary,项目名称:mw,代码行数:30,代码来源:genvideos_mvs.py

示例9: Resolve

# 需要导入模块: from entertainment.net import Net [as 别名]
# 或者: from entertainment.net.Net import http_POST [as 别名]
 def Resolve(self, url):
     
     from entertainment.net import Net
     net = Net()
     
     if 'playsominaltv.com' in url:
         
         net._cached = False
         
         premium_url = 'http://www.playsominaltv.com/login/?redirect_to=' + url
         content = net.http_GET(premium_url, headers={'Referer':url}).content
         params={'log':self.Settings().get_setting('user'), 'pwd':self.Settings().get_setting('pass'), 'wp-submit':'1'}
         for hidden_param in re.finditer('(<input.+?type=[\'"]{1}hidden[\'"]{1}.+?/>)', content):
             hidden_param_input = hidden_param.group(1)
             param_name = re.search('name=[\'"]{1}(.+?)[\'"]{1}', hidden_param_input).group(1)
             param_value = re.search('value=[\'"]{1}(.+?)[\'"]{1}', hidden_param_input).group(1)
             params.update( { param_name : param_value } )
         content = net.http_POST('http://www.playsominaltv.com/login/',params,headers={'Referer':premium_url}).content
     
     if 'playsominaltv.com' in url or 'sominaltvfilms.com' in url or 'desionlinetheater.com' in url:
         content = net.http_GET(url).content
         content=dekode(content)
         if content:
             source_url=re.search('<iframe.+?src.+?(http.+?)[\'"\\\\]{1}', content)
             if source_url:
                 return MovieSource.Resolve(self, source_url.group(1))
     else:
         return MovieSource.Resolve(self, url)
         
     return url
开发者ID:bialagary,项目名称:mw,代码行数:32,代码来源:sominaltv_mvi_mvs_cst.py

示例10: Resolve

# 需要导入模块: from entertainment.net import Net [as 别名]
# 或者: from entertainment.net.Net import http_POST [as 别名]
    def Resolve(self, url):
        import re
        from entertainment.net import Net
        net = Net(cached=False)

        common.addon.log( self.name.upper() + ' - Link: %s' % url )
        common.addon.show_small_popup('[B][COLOR blue]I[/B][/COLOR]stream: [B][COLOR white]' + self.name.upper() + '[/B][/COLOR]',
                                      'Resolving', 700, self.icon)

        html = net.http_GET(url).content
        net.save_cookies(self.cookie_file)
        net.set_cookies(self.cookie_file)

        try:
            if not re.search(r'value=\"Continue to video',html,re.I):
                raise Exception ('File Not Found')
            
            html = net.http_POST(url,form_data={'Continue':'Continue to video'},
                                 headers={'Content-Type':'application/x-www-form-urlencoded'}
                                 ).content

            finalLink = re.search(r'var\sxxxx\s\=\s\"(.*?)\"',html)
            if finalLink:
                return finalLink.group(1)

            else:
                raise Exception ('No Media Found To Stream')

        except Exception, e:
            common.addon.log(self.name.upper() + ' - Exception occured: %s' % e)
            common.addon.show_small_popup('[B][COLOR blue]I[/B][/COLOR]stream: [B][COLOR white]' + self.name.upper() + '[/B][/COLOR]', '[COLOR red]'+str(e)+'[/COLOR]', 3000, self.icon)                
            return None
开发者ID:bialagary,项目名称:mw,代码行数:34,代码来源:shared2_hrv.py

示例11: GetFileHosts

# 需要导入模块: from entertainment.net import Net [as 别名]
# 或者: from entertainment.net.Net import http_POST [as 别名]
    def GetFileHosts(self, url, list, lock, message_queue): 

        from entertainment.net import Net
        net = Net()
        
        custom_url = self.get_url()
        
        source_args = {
              'iqs': '',
              'url': '',
              'cap': ''
          }
        
        content = net.http_GET(url).content        
        
        import random
        import copy
        import urllib
        import re
        
        sec = re.search("f\.lastChild\.value=\"(.+?)\",a", content).group(1)        
        source_args['sec'] = sec
        
        t = re.search('"&t=([^"]+)",', content).group(1)
        source_args['t'] = t           
        
        ajax_url = custom_url + 'membersonly/components/com_iceplayer/video.phpAjaxResp.php'
        headers = {'Content-type':'application/x-www-form-urlencoded'}
        
        for sq in re.finditer(r"<div class=ripdiv><b>(.+?)</b><p>(.+?)<p></div>", content):
            quality = sq.group(1)
            
            if 'DVD' in quality:
                quality = 'DVD'

            elif '1080' in quality:
                quality = '1080P'                
            elif '720' in quality:
                quality = '720P'
                
            else:
                quality = 'SD'
            for source in re.finditer(r"<a.+?go\((.+?)\)", sq.group(2)):                
                a = source.group(1)
                
                m = random.randrange(100, 300) * -1
                s = random.randrange(5, 50)
                source_params = copy.copy(source_args)
                cache_source_params = copy.copy(source_args)
                source_params['id'] = a
                cache_source_params['id'] = a
                source_params['m'] = m
                source_params['s'] = s                
                
                ajax_content = net.http_POST(ajax_url, source_params, headers, form_data_for_cache=cache_source_params).content
                host_url = urllib.unquote(re.search(r"url=(.*)", ajax_content).group(1))
                
                self.AddFileHost(list, quality, host_url)
开发者ID:bialagary,项目名称:mw,代码行数:60,代码来源:icefilms_mvi_mvs_tvi_tvs_cst.py

示例12: GetFileHosts

# 需要导入模块: from entertainment.net import Net [as 别名]
# 或者: from entertainment.net.Net import http_POST [as 别名]
    def GetFileHosts(self, url, list, lock, message_queue):

        import re

        from entertainment.net import Net

        net = Net(do_not_cache_if_any=do_no_cache_keywords_list)
        net._cached = False
        tv_user = self.Settings().get_setting("tv_user")
        tv_pwd = self.Settings().get_setting("tv_pwd")
        loginurl = "https://directdownload.tv"
        data = {"password": tv_pwd, "username": tv_user, "Login": "Login", "mode": "normal"}
        headers = {
            "Referer": "https://directdownload.tv",
            "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
            "Connection": "keep-alive",
            "Content-Type": "application/x-www-form-urlencoded",
            "Host": "directdownload.tv",
            "Origin": "http://directdownload.tv",
            "User-Agent": "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36",
        }
        net.http_POST(loginurl, data, headers).content
        net.save_cookies(self.cookie_file)
        net.set_cookies(self.cookie_file)

        content = net.http_GET(url).content

        r = '{"url":"(.+?)","hostname":".+?"}'
        match = re.compile(r).findall(content)

        urlselect = []

        for url in match:
            print url
            if url not in urlselect:
                urlselect.append(url)

                quality = "SD"
                url_lower = "." + url.lower() + "."
                for quality_key, quality_value in common.quality_dict.items():
                    if re.search("[^a-zA-Z0-0]" + quality_key + "[^a-zA-Z0-0]", url_lower):
                        quality = quality_value
                        break

                self.AddFileHost(list, quality, url.replace("\/", "/"))
开发者ID:bialagary,项目名称:mw,代码行数:47,代码来源:Directdownload_tvs_cst.py

示例13: GetFileHosts

# 需要导入模块: from entertainment.net import Net [as 别名]
# 或者: from entertainment.net.Net import http_POST [as 别名]
    def GetFileHosts(self, id, other_names, region, language, list, lock, message_queue):

        quality_dict = {'1200':'HD', '800':'SD', '600':'LOW'}
        
        import re
        from entertainment.net import Net
        net = Net(cached=False)
        
        if not 'itv' in id: return
        
        if '2' in id or '3' in id:

            id=id.split('itv')[1]           
            name='ITV '+id
            
            SoapMessage=self.TEMPLATE('sim'+id,'itv'+id)
            
            headers={'Content-Length':'%d'%len(SoapMessage),'Content-Type':'text/xml; charset=utf-8','Host':'mercury.itv.com','Origin':'http://www.itv.com','Referer':'http://www.itv.com/Mercury/Mercury_VideoPlayer.swf?v=null','SOAPAction':"http://tempuri.org/PlaylistService/GetPlaylist",'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36'}

            response = net.http_POST("http://mercury.itv.com/PlaylistService.svc",SoapMessage, headers=headers).content
            
            response = response.split('VideoEntries')[1]
        
        
            

        if id =='itv1':
            name='ITV 1'
            url='http://www.itv.com/mediaplayer/xml/channels.itv1.xml'
            response = net.http_GET(url).content
    
            
        if id =='itv4':
            name='ITV 4'
            url='http://www.itv.com/mediaplayer/xml/channels.itv4.xml'



            response = net.http_GET(url).content

        

        rtmp=re.compile('<MediaFiles base="(.+?)"').findall(response)[0]
        match=re.compile('CDATA\[(.+?)\]').findall(response)
        for playpath in match:
            print playpath
            res=playpath.split('_')[1]
            res=res.split('@')[0]
            
            resolved_media_url=rtmp+' playpath='+playpath+' swfUrl=http://www.itv.com/mediaplayer/ITVMediaPlayer.swf?v=12.18.4 live=true timeout=10 swfvfy=true'
        
            
            self.AddLiveLink( list, name, resolved_media_url, language='English',host='ITV PLAYER',quality=quality_dict.get(res, 'NA') )
开发者ID:bialagary,项目名称:mw,代码行数:55,代码来源:itv_ltvs.py

示例14: GetFileHostsForContent

# 需要导入模块: from entertainment.net import Net [as 别名]
# 或者: from entertainment.net.Net import http_POST [as 别名]
    def GetFileHostsForContent(self, title, name, year, season, episode, type, list, lock, message_queue):

        import urllib2
        import re
        from entertainment.net import Net

        net = Net(cached=False,user_agent='Magic Browser')
        
        title = self.CleanTextForSearch(title) 
        name = self.CleanTextForSearch(name)


        wait=False
        new_url='http://movietv.to/index/loadmovies'
        if type == 'tv_episodes':
            types='tv'
            r='href="/series/(.+?)".+?movie-title">(.+?)</h2>'
            NEW='http://movietv.to/series/'
        else:
            types='movie'
            r='href="/movies/(.+?)".+?movie-title">(.+?)</h2>'
            NEW='http://movietv.to/movies/'
            
        data={'loadmovies':'showData','page':'1','abc':'All','genres':'','sortby':'Popularity','quality':'All','type':types,'q':name}
        content=net.http_POST(new_url,data,headers={'Referer':'http://movietv.to'}).content
        
       
        match=re.compile(r,re.DOTALL).findall (content)
        print 'wwwwwwwwwwwwwwwwwwwwwwwwwwwwwww'
        print match
        for URL , TITLE in match:
                print TITLE
                print URL
                if name.lower() in TITLE.lower():
                    if type == 'tv_episodes':
                        id=URL.split('-')[0]
                        LINKURL='http://movietv.to/series/getLink?id=%s&s=%s&e=%s' % (id,season,episode)
                        contents=net.http_GET(LINKURL).content
                        import json
                        match=json.loads(contents)['url']
                        

                    else:
                        
                        contents=net.http_GET(NEW+URL).content
                        
                        match=re.compile('<source src="(.+?)" type=\'video/mp4\'>').findall(contents)[0]
                    
                    self.GetFileHosts(match, list, lock, message_queue,URL)
开发者ID:bialagary,项目名称:mw,代码行数:51,代码来源:movieto_mvs_tvs.py

示例15: Resolve

# 需要导入模块: from entertainment.net import Net [as 别名]
# 或者: from entertainment.net.Net import http_POST [as 别名]
    def Resolve(self, url):
        resolved_media_url = ''
        import re
        from entertainment.net import Net
        net = Net()
        
        content = net.http_GET(url, headers={'Referer':self.base_url}).content
        answer=re.compile('Question: (.+?) =').findall(content)[0].replace('x','*')

        data={'captcha':eval(answer)}
        content = net.http_POST(url,data, headers={'Referer':self.base_url}).content

        '''
        m3u8_url = re.search('[\'"](http.+?\.m3u8.+?)[\'"]', content)
        if m3u8_url:
            resolved_media_url = m3u8_url.group(1)
        '''
        token_url = re.compile('\$.getJSON\("(.+?)",').findall(content)[0]
        import datetime
        time_now=datetime.datetime.now()
        import time
        epoch=time.mktime(time_now.timetuple())+(time_now.microsecond/1000000.)
        epoch_str = str('%f' % epoch)
        epoch_str = epoch_str.replace('.','')
        epoch_str = epoch_str[:-3]

        token_url = token_url + '&_=' + epoch_str
        token = re.compile('":"(.+?)"').findall(net.http_GET(token_url+'&_='+str(epoch), headers={'Referer':url}).content)[0]
        
        streamer = re.search('streamer: "(.+?)"', content).group(1)
        
        playpath = re.search('file: "(.+?)"', content).group(1)
        if playpath.endswith('.flv'):
            playpath = playpath[:-4]
        elif playpath.endswith('.mp4'):
            playpath = 'mp4:' + playpath
        
        player = re.search('flashplayer: "(.+?)"', content).group(1)
        pageurl = self.base_url #url
        streamer = streamer.replace('\/', '/')
        app = re.search('rtmp://[\.\w\:]*/(.*)', streamer).group(1)
        
        resolved_media_url = streamer + ' app=' + app + ' playpath=' + playpath + ' swfUrl=' + player + ' live=1 timeout=15 token=' + token + ' swfVfy=1 pageUrl=' + pageurl
        
        return resolved_media_url
开发者ID:bialagary,项目名称:mw,代码行数:47,代码来源:iliveto_ltvs.py


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