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


Python utils.getHtml函数代码示例

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


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


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