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


Python Net.get_cookies方法代码示例

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


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

示例1: GrabMailRu

# 需要导入模块: from entertainment.net import Net [as 别名]
# 或者: from entertainment.net.Net import get_cookies [as 别名]
    def GrabMailRu(self,url,list):
        print 'RESOLVING VIDEO.MAIL.RU VIDEO API LINK'
        
        from entertainment.net import Net
        net = Net(cached=False)

        
        import json,re
        items = []

        data = net.http_GET(url).content
        cookie = net.get_cookies()
        for x in cookie:

             for y in cookie[x]:

                  for z in cookie[x][y]:
                       
                       l= (cookie[x][y][z])
                       
        r = '"key":"(.+?)","url":"(.+?)"'
        match = re.compile(r,re.DOTALL).findall(data)
        for quality,stream in match:
            test = str(l)
            test = test.replace('<Cookie ','')
            test = test.replace(' for .my.mail.ru/>','')
            url=stream +'|Cookie='+test
            QUALITY=quality.upper()
            if '480' in QUALITY:
                QUALITY = '720P'
            self.AddFileHost(list, QUALITY, url,host='WATCH-TVSERIES.NET') 
开发者ID:bialagary,项目名称:mw,代码行数:33,代码来源:watch_tvseries_tvs.py

示例2: GrabMailRu

# 需要导入模块: from entertainment.net import Net [as 别名]
# 或者: from entertainment.net.Net import get_cookies [as 别名]
    def GrabMailRu(self,url,list):
        print 'RESOLVING VIDEO.MAIL.RU VIDEO API LINK'
        
        
        from entertainment.net import Net
        net = Net(cached=False)

        
        import json,re
        items = []

        data = net.http_GET(url).content
        cookie = net.get_cookies()
        
        for x in cookie:
             if '.my.mail.ru' in x: 
                 for y in cookie[x]:
                      for z in cookie[x][y]:
                           l= (cookie[x][y][z])
                       
        r = '"key":"(.+?)","url":"(.+?)"'
        match = re.compile(r,re.DOTALL).findall(data)
        for quality,stream in match:
            test = str(l)
            test = test.replace('<Cookie ','')
            matcher =re.compile('for (.+?)>').findall(test)[0]
            test = test.replace(' for '+matcher+'>','')
            url=stream +'|Cookie='+test
            Q=quality.upper()
            if Q == '1080P':
                Q ='1080P'
            elif Q == '720P':
                Q ='720P'                
            elif Q == '480P':
                Q ='HD'
            else:
                Q ='SD'     
            self.AddFileHost(list, Q, url,host='MAIL.RU')  
开发者ID:bialagary,项目名称:mw,代码行数:40,代码来源:beinmovie_mvs.py


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