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


Python Decoder.extractSawlive方法代码示例

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


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

示例1: getChannels

# 需要导入模块: from core.decoder import Decoder [as 别名]
# 或者: from core.decoder.Decoder import extractSawlive [as 别名]
 def getChannels(page):
     x = []
     if str(page) == "0":
         page = Live9net.MAIN_URL
     html = Live9net.getContentFromUrl(page, "", Live9net.cookie, "")
     # print html
     if html.find("ESPN</") > -1:  # it's a list, needs decode
         table = Decoder.extract("ESPN</", "<div>", html)
         x = Live9net.extractElements(table)
         logger.debug("live9 channels logic done!")
     else:
         iframeUrl = Decoder.extract('src="', '"></iframe>', html)
         html2 = Live9net.getContentFromUrl(iframeUrl, "", Live9net.cookie, page)
         # print html2
         if html2.find('src="http://sawlive.tv/') > -1 or html2.find('src="http://www3.sawlive') > -1:
             if html2.find('src="http://sawlive.tv/') > -1:
                 scriptSrc = Decoder.extractWithRegex("http://sawlive", '"></script>', html2).replace(
                     '"></script>', ""
                 )
             else:
                 scriptSrc = Decoder.extractWithRegex("http://www3.sawlive", '"></script>', html2).replace(
                     '"></script>', ""
                 )
             finalRtmpUrl = Decoder.extractSawlive(scriptSrc, iframeUrl)
             element = {}
             element["link"] = finalRtmpUrl
             element["title"] = "Watch channel"
             element["permalink"] = True
             logger.debug("finished append element!")
             x.append(element)
     return x
开发者ID:harddevelop,项目名称:tvbox,代码行数:33,代码来源:live9net.py

示例2: extractIframeValue

# 需要导入模块: from core.decoder import Decoder [as 别名]
# 或者: from core.decoder.Decoder import extractSawlive [as 别名]
 def extractIframeValue(iframe,html,referer):
     file = ""
     if iframe.find("http:")!=0:
         iframe = Decoder.extract("<iframe src='","' ",html).replace("'","") #take into account .lower() characters, so is not ' SRC=
         if iframe.find("http:")!=0:
             iframe = Decoder.extract(' src="','"',html).replace('"',"")
     logger.debug("using iframeUrl: "+iframe)
     if iframe.find("filmon.")>-1: # i prefer this fix to change all logic, really, I boried about this provider and is a 'silly' provider
         logger.debug("Detected exceptional filmon.com|tv provider: "+iframe)
         file = Filmoncom.launchScriptLogic(iframe,referer)[0]["url"]
     else:
         html2 = Cricfreetv.getContentFromUrl(iframe,"",Cricfreetv.cookie,referer)
         #print html2
         if html2.find("http://www3.sawlive.tv/embed/")>-1:
             iframe2 = Decoder.extractWithRegex("http://www3.sawlive.tv/embed/",'"',html2).replace('"',"")
             logger.debug("detected a sawlive: "+iframe2+", from: "+iframe)
             #file = Live9net.getChannels(iframe2) #Live9net has the sawlive decoder, so it decodes target link
             file = Decoder.extractSawlive(iframe2,Cricfreetv.cookie,iframe)
         else:
             file = Cricfreetv.seekIframeScript(html2,referer,iframe)
     return file
开发者ID:harddevelop,项目名称:tvbox,代码行数:23,代码来源:cricfreetv.py


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