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

Python utils.getHtml函数代码示例

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

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



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

示例1: PHVideo

def PHVideo(url, name, download=None):
    progress.create('Play video', 'Searching videofile.')
    progress.update( 10, "", "Loading video page", "" )
    Supported_hosts = ['Openload.io', 'StreamCloud', 'NowVideo', 'FlashX', 'www.flashx.tv', 'streamcloud.eu', 'streamin.to']
    videopage = utils.getHtml(url, '')
    match = re.compile(r'<li id="link-([^"]+).*?xs-12">\s+Watch it on ([\w\.]+)', re.DOTALL | re.IGNORECASE).findall(videopage)
    if len(match) > 1:
        sites = []
        vidurls = []
        for videourl, site in match:
            if site in Supported_hosts:
                sites.append(site)
                vidurls.append(videourl)
        if len(sites) ==  1:
            sitename = match[0][1]
            siteurl = match[0][0]
        else:
            site = utils.dialog.select('Select video site', sites)
            sitename = sites[site]
            siteurl = vidurls[site]
    else:
        sitename = match[0][1]
        siteurl = match[0][0]
    outurl = "http://www.pornhive.tv/en/out/" + siteurl
    progress.update( 20, "", "Getting video page", "" )
    if 'loud' in sitename:
        progress.update( 30, "", "Getting StreamCloud", "" )
        playurl = getStreamCloud(outurl)
    elif "lash" in sitename:
        progress.update( 30, "", "Getting FlashX", "" )
        playurl = getFlashX(outurl)
    elif sitename == "NowVideo":
        progress.update( 30, "", "Getting NowVideo", "" )
        playurl = getNowVideo(outurl)        
    elif "Openload" in sitename:
        progress.update( 30, "", "Getting Openload", "" )
        progress.close()
        utils.PLAYVIDEO(outurl, name, download)
        return
    elif "streamin" in sitename:
        progress.update( 30, "", "Getting Streamin", "" )
        streaming = utils.getHtml(outurl, '')
        outurl=re.compile("action='([^']+)'").findall(streaming)[0]
        progress.close()
        utils.playvideo(outurl, name, download)
        return
    else:
        progress.close()
        utils.dialog.ok('Sorry','This host is not supported.')
        return
    progress.update( 90, "", "Playing video", "" )
    progress.close()
    if download == 1:
        utils.downloadVideo(playurl, name)
    else:
        iconimage = xbmc.getInfoImage("ListItem.Thumb")
        listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
        listitem.setInfo('video', {'Title': name, 'Genre': 'Porn'})
        xbmc.Player().play(playurl, listitem)
开发者ID:dreamykun,项目名称:WhiteCream-V0.0.1,代码行数:59,代码来源:pornhive.py


示例2: BGVersion

def BGVersion():
    bgpage = utils.getHtml('http://beeg.com','')
    bgversion = re.compile(r"cpl/(\d+)\.js", re.DOTALL | re.IGNORECASE).findall(bgpage)[0]
    bgsavedversion = addon.getSetting('bgversion')
    if bgversion <> bgsavedversion:
        addon.setSetting('bgversion',bgversion)
        bgjspage = utils.getHtml('http://static.beeg.com/cpl/'+bgversion+'.js','http://beeg.com')
        bgsalt = re.compile('beeg_salt="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(bgjspage)[0]
        addon.setSetting('bgsalt',bgsalt)
开发者ID:rofunds,项目名称:maximumTv,代码行数:9,代码来源:beeg.py


示例3: Playvid

def Playvid(url, name, download):
    videopage = utils.getHtml(url)
    plurl = re.compile('\?u=([^"]+)"', re.DOTALL | re.IGNORECASE).findall(videopage)[0]
    plurl = 'http://sexix.net/qaqqew/playlist.php?u=' + plurl
    plpage = utils.getHtml(plurl, url)
    videourl = re.compile('file="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(plpage)[0]
    if videourl:
        utils.playvid(videourl, name, download)
    else:
        utils.notify('Oh oh','Couldn\'t find a video')
开发者ID:Mirocow,项目名称:WhiteCream-V0.0.2,代码行数:10,代码来源:sexix.py


示例4: PPlayvid

def PPlayvid(url, name):
    videopage = utils.getHtml(url, '')
    match = re.compile('<iframe.*?src="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(videopage)
    iframepage = utils.getHtml(match[0], url)
    video720 = re.compile("_720 = '([^']+)'", re.DOTALL | re.IGNORECASE).findall(iframepage)
    videourl = video720[0]
    iconimage = xbmc.getInfoImage("ListItem.Thumb")
    listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
    listitem.setInfo('video', {'Title': name, 'Genre': 'Porn'})
    xbmc.Player().play(videourl, listitem)
开发者ID:natonatonato,项目名称:WhiteCream-V0.0.1,代码行数:10,代码来源:hdporn.py


示例5: Playvid

def Playvid(url, name, download=None):
    print "cat3movie::playvid " + url
    progress.create('Play video', 'Searching videofile.')
    progress.update( 10, "", "Loading video page", "" )
    html = utils.getHtml(url, '')
    embedLinks = re.compile('<a href="(.+?)" rel="nofollow" target="_blank">').findall(html)
    url = ''
    for link in embedLinks:
        html = utils.getHtml(link, '')
        base64str = re.compile('Base64.decode\("(.+?)"\)').findall(html)
        url = url + " " + base64.b64decode(base64str[0])
    utils.playvideo(url, name, download)
开发者ID:Fr33m1nd,项目名称:WhiteCream-V0.0.1,代码行数:12,代码来源:cat3movie.py


示例6: Playvid

def Playvid(url, name, download=None):
    progress.create('Play video', 'Searching videofile.')
    progress.update( 10, "", "Loading video page", "" )
    html = utils.getHtml(url, '')
    embedLinks = re.compile('<a href="([^"]+)" rel="nofollow" target="_blank">').findall(html)
    url = ''
    for link in embedLinks:
        if 'embedlink' in link:
            try:
                html = utils.getHtml(link, '')
                if 'Base64' in html:
                    base64str = re.compile(r'Base64\.decode\("([^"]+)"').findall(html)
                    url = url + " " + base64.b64decode(base64str[0])
            except: pass
    utils.playvideo(url, name, download, url)
开发者ID:Mirocow,项目名称:WhiteCream-V0.0.2,代码行数:15,代码来源:cat3movie.py


示例7: Playvid

def Playvid(url, name, download=None):
    print "mrsexe::Playvid " + url
    html = utils.getHtml(url, '')
    videourl = re.compile(r"src='(/inc/clic\.php\?video=.+?&cat=mrsex.+?)'").findall(html)
    html = utils.getHtml('http://www.mrsexe.com/' + videourl[0], '')
    videourls = re.compile(r"'file': \"(.+?)\",.+?'label': '(.+?)'", re.DOTALL).findall(html)
    videourls = sorted(videourls, key=lambda tup: tup[1], reverse=True)
    videourl = videourls[0][0]
    if download == 1:
        utils.downloadVideo(videourl, name)
    else:    
        iconimage = xbmc.getInfoImage("ListItem.Thumb")
        listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
        listitem.setInfo('video', {'Title': name, 'Genre': 'Porn'})
        xbmc.Player().play(videourl, listitem)
开发者ID:Mirocow,项目名称:WhiteCream-V0.0.2,代码行数:15,代码来源:mrsexe.py


示例8: STREAMS

def STREAMS():
    streamurl = 'http://bit.ly/uwcstreams'
    streamlist = utils.getHtml(streamurl, '')
    match = re.compile('#.+,(.+?)\n(.+?)\n').findall(streamlist)
    for name, url in match:
        utils.addDownLink(name, url, 9, '', '', True)
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:rofunds,项目名称:maximumTv,代码行数:7,代码来源:default.py


示例9: getBMW

def getBMW(url):
    videopage = utils.getHtml(url, '')
    #redirecturl = utils.getVideoLink(url, '')
    #videodomain = re.compile("http://([^/]+)/", re.DOTALL | re.IGNORECASE).findall(redirecturl)[0]
    videos = re.compile(r'file: "([^"]+mp4)", label: "\d', re.DOTALL | re.IGNORECASE).findall(videopage)
    videourl = videos[-1]
    return videourl
开发者ID:opesboy,项目名称:WhiteCream-V0.0.1,代码行数:7,代码来源:hqporner.py


示例10: PAQList

def PAQList(url, page, onelist=None):
    if onelist:
        url = url.replace("page/1/", "page/" + str(page) + "/")
    listhtml = utils.getHtml(url, "")
    if "pornaq" in url:
        match = re.compile(
            r'<h2>\s+<a title="([^"]+)" href="([^"]+)".*?src="([^"]+)" class="attachment-primary-post-thumbnail',
            re.DOTALL | re.IGNORECASE,
        ).findall(listhtml)
        for name, videopage, img in match:
            name = utils.cleantext(name)
            utils.addDownLink(name, videopage, 62, img, "")
    elif "porn00" in url:
        match = re.compile(
            '<h2> <a title="([^"]+)" href="([^"]+)".*?src="([^"]+)" class="attachment-primary-post-thumbnail',
            re.DOTALL | re.IGNORECASE,
        ).findall(listhtml)
        for name, videopage, img in match:
            name = utils.cleantext(name)
            utils.addDownLink(name, videopage, 62, img, "")
    if not onelist:
        if re.search("<span class='current'>\d+?</span><span>", listhtml, re.DOTALL | re.IGNORECASE):
            npage = page + 1
            url = url.replace("page/" + str(page) + "/", "page/" + str(npage) + "/")
            utils.addDir("Next Page (" + str(npage) + ")", url, 61, "", npage)
        xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:Fr33m1nd,项目名称:WhiteCream-V0.0.1,代码行数:26,代码来源:hdporn.py


示例11: NLCAT

def NLCAT(url, site):
    siteurl = sitelist[site]
    link = utils.getHtml(url, '')
    tags = re.compile('<div class="category".*?href="([^"]+)".*?<h2>([^<]+)<.*?src="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(link)
    for caturl, catname, catimg in tags:
        catimg = siteurl + catimg
        utils.addDir(catname,caturl,101,catimg,site)
开发者ID:opesboy,项目名称:WhiteCream-V0.0.1,代码行数:7,代码来源:nltubes.py


示例12: PHCat

def PHCat(url):
    cathtml = utils.getHtml(url, '')
    match = re.compile('<ul class="dropdown-menu my-drop">(.*?)</ul>', re.DOTALL | re.IGNORECASE).findall(cathtml)
    match1 = re.compile('href="([^"]+)[^>]+>([^<]+)<', re.DOTALL | re.IGNORECASE).findall(match[0])
    for catpage, name in match1:
        utils.addDir(name, catpage, 71, '')
    xbmcplugin.endOfDirectory(utils.addon_handle)   
开发者ID:dreamykun,项目名称:WhiteCream-V0.0.1,代码行数:7,代码来源:pornhive.py


示例13: TPCat

def TPCat(url):
    caturl = utils.getHtml(url, '')
    match = re.compile('<img src="([^"]+)"[^<]+<[^"]+"([^"]+)">([^<]+)<', re.DOTALL | re.IGNORECASE).findall(caturl)
    for thumb, caturl, cat in match:
        caturl = "http://www.todayporn.com" + caturl + "page1.html"
        utils.addDir(cat, caturl, 91, thumb, 1)
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:jake47,项目名称:WhiteCream-V0.0.1.bundle,代码行数:7,代码来源:todayporn.py


示例14: Tags

def Tags(url):
    html = utils.getHtml(url, '')
    match = re.compile('<div class="tagcloud">(.*?)</div>', re.DOTALL | re.IGNORECASE).findall(html)
    match1 = re.compile("href='([^']+)[^>]+>([^<]+)<", re.DOTALL | re.IGNORECASE).findall(match[0])
    for catpage, name in match1:
        utils.addDir(name, catpage, 181, '')
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:Fr33m1nd,项目名称:WhiteCream-V0.0.1,代码行数:7,代码来源:javhdonline.py


示例15: YFTCat

def YFTCat(url):
    cathtml = utils.getHtml(url, '')
    match = re.compile('<ul class="pm-browse-ul-subcats">(.*?)</ul>', re.DOTALL | re.IGNORECASE).findall(cathtml)
    match1 = re.compile('<a href="([^"]+)" class="">([^<]+)<', re.DOTALL | re.IGNORECASE).findall(match[0])
    for catpage, name in match1:
        utils.addDir(name, catpage, 191, '')
    xbmcplugin.endOfDirectory(utils.addon_handle)   
开发者ID:Fr33m1nd,项目名称:WhiteCream-V0.0.1,代码行数:7,代码来源:yourfreetube.py


示例16: Categories

def Categories(url):
    cathtml = utils.getHtml(url, '')
    match = re.compile("<a href='/top/([^']+)'>.*?src='([^']+)' alt='([^']+)'", re.DOTALL | re.IGNORECASE).findall(cathtml)
    for catid, img, name in match:
        catpage = "http://anybunny.com/new/"+ catid
        utils.addDir(name, catpage, 321, img)
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:NothingGnome,项目名称:WhiteCream-V0.0.1,代码行数:7,代码来源:anybunny.py


示例17: Categories

def Categories(url):
    cathtml = utils.getHtml(url, '')
    match = re.compile('data-original="([^"]+)".*?href="([^"]+)">([^<]+)<.*?strong>([^<]+)<', re.DOTALL | re.IGNORECASE).findall(cathtml)
    for img, catpage, name, videos in match:
        name = name + ' [COLOR blue]' + videos + ' videos[/COLOR]'
        utils.addDir(name, catpage, 131, img)
    xbmcplugin.endOfDirectory(utils.addon_handle)   
开发者ID:Fr33m1nd,项目名称:WhiteCream-V0.0.1,代码行数:7,代码来源:xvideospanish.py


示例18: BGPlayvid

def BGPlayvid(url, name, download=None):
    videopage = utils.getHtml(url, '')
    match = re.compile("'720p': '([^']+)'", re.DOTALL | re.IGNORECASE).findall(videopage)
    if not match:
        match = re.compile("'480p': '([^']+)'", re.DOTALL | re.IGNORECASE).findall(videopage)
    if not match:
        match = re.compile("'240p': '([^']+)'", re.DOTALL | re.IGNORECASE).findall(videopage)
    if match:    
        videourl = match[0]
        if download == 1:
            utils.downloadVideo(videourl, name)
        else:
            iconimage = xbmc.getInfoImage("ListItem.Thumb")
            listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
            listitem.setInfo('video', {'Title': name, 'Genre': 'Porn'})
            listitem.setProperty("IsPlayable","true")
            if int(sys.argv[1]) == -1:
                pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
                pl.clear()
                pl.add(videourl, listitem)
                xbmc.Player().play(pl)
                #xbmc.Player().play(videourl, listitem)
            else:
                listitem.setPath(str(videourl))
                xbmcplugin.setResolvedUrl(utils.addon_handle, True, listitem)
开发者ID:jake47,项目名称:WhiteCream-V0.0.1.bundle,代码行数:25,代码来源:beeg.py


示例19: PHVideo

def PHVideo(url, name):
    progress.create("Play video", "Searching videofile.")
    progress.update(10, "", "Loading video page", "")
    videopage = utils.getHtml(url, "")
    match = re.compile(r'<li id="link-([^"]+).*?xs-12">\s+Watch it on ([\w]+)', re.DOTALL | re.IGNORECASE).findall(
        videopage
    )
    if len(match) > 1:
        sites = []
        for videourl, site in match:
            sites.append(site)
        site = utils.dialog.select("Select video site", sites)
        sitename = match[site][1]
        siteurl = match[site][0]
    else:
        sitename = match[0][1]
        siteurl = match[0][0]
    outurl = "http://www.pornhive.tv/en/out/" + siteurl
    progress.update(20, "", "Getting video page", "")
    if sitename == "StreamCloud":
        progress.update(30, "", "Getting StreamCloud", "")
        playurl = getStreamCloud(outurl)
    elif sitename == "FlashX":
        progress.update(30, "", "Getting FlashX", "")
        playurl = getFlashX(outurl)
    else:
        progress.close()
        utils.dialog.ok("Sorry", "This host is not supported.")
        return
    progress.update(90, "", "Playing video", "")
    iconimage = xbmc.getInfoImage("ListItem.Thumb")
    listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
    listitem.setInfo("video", {"Title": name, "Genre": "Porn"})
    xbmc.Player().play(playurl, listitem)
开发者ID:natonatonato,项目名称:WhiteCream-V0.0.1,代码行数:34,代码来源:pornhive.py


示例20: WXFTPS

def WXFTPS(url):
    tpshtml = utils.getHtml(url, '')
    match = re.compile("<li><a href='([^']+)[^>]+>([^<]+)", re.DOTALL | re.IGNORECASE).findall(tpshtml)
    for tpsurl, name in match:
        tpsurl = tpsurl + 'page/1/'
        utils.addDir(name, tpsurl, 11, '', 1)
    xbmcplugin.endOfDirectory(utils.addon_handle)    
开发者ID:NothingGnome,项目名称:WhiteCream-V0.0.1,代码行数:7,代码来源:watchxxxfree.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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