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


Python utils.addDownLink函数代码示例

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


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

示例1: BGList

def BGList(url):
    bgversion = addon.getSetting('bgversion')
    try:
        listjson = utils.getHtml(url,'')
    except:
        utils.notify('Oh oh','It looks like this website is down.')
        return None

    match = re.compile(r'\{"title":"([^"]+)","id":"([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listjson)

    for title, videoid in match:
        img = "http://img.beeg.com/236x177/" + videoid +  ".jpg"
        videopage = "https://api.beeg.com/api/v6/"+bgversion+"/video/" + videoid
        name = title.encode("utf8")
        utils.addDownLink(name, videopage, 82, img, '')
    try:
        page=re.compile('http://api2.beeg.com/api/v6/'+bgversion+'/index/[^/]+/([0-9]+)/pc', re.DOTALL | re.IGNORECASE).findall(url)[0]
        page = int(page)
        npage = page + 1
        jsonpage = re.compile(r'pages":(\d+)', re.DOTALL | re.IGNORECASE).findall(listjson)[0]
        if int(jsonpage) > page:
            nextp = url.replace("/"+str(page)+"/", "/"+str(npage)+"/")
            utils.addDir('Next Page ('+str(npage)+')', nextp,81,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:anton40,项目名称:WhiteCream-V0.0.1,代码行数:25,代码来源:beeg.py

示例2: v7_list

def v7_list(url, page=None, search=None):
    orig_url = str(url)
    if page:
        page_end = 'page/' + str(page) + '/' if url.endswith('/') else '/page/' + str(page) + '/'
        url += page_end
    else:
        page = 1
    sort = '?orderby=date' if url.endswith('/') else '/?orderby=date'
    url += sort
    url = url + search if search else url
    try:
        listhtml = utils.getHtml(url)
    except Exception as e:
        return None
    match = re.compile('''class='thumb-wrapp'.*?href='([^']+)'.*?"([^"]+)".*?class='vl'(.*?)class="duration">(.*?)</div>.*?class='hp'[^>]+>([^<]+)<''', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for videopage, img, hd, duration, name in match:
        hd = ' [COLOR orange]HD[/COLOR] ' if 'HD' in hd else ' '
        name = utils.cleantext(name) + hd + duration.strip()
        utils.addDownLink(name, videopage, 642, img, '')
    pages_html = re.compile('<div class="buttons">(.*?)</div', re.DOTALL | re.IGNORECASE).findall(listhtml)[0]
    pages = re.compile('<a[^>]+>(.*?)</a', re.DOTALL | re.IGNORECASE).findall(pages_html)
    pages = [int(p.replace('&nbsp;', '').replace('...', '').strip()) for p in pages]
    max_page = max(pages)
    if page < max_page:
        utils.addDir('Next Page (' + str(page + 1) + ')' , orig_url, 641, '', page + 1, search)
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:YourFriendCaspian,项目名称:dotfiles,代码行数:26,代码来源:vidz7.py

示例3: PTList

def PTList(url, page=1, onelist=None):
    if onelist:
        url = url.replace('page=1','page='+str(page))
    try:
        listhtml = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh','It looks like this website is down.')
        return None
    match = re.compile(r'<div class="(?:visible-xs|thumb-overlay)+">\s+<img src=.*?data-original="([^"]+)" title="([^"]+)"[^>]+>(.*?)duration">[^\d]+([^\t\n\r]+)', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for img, name, hd, duration in match:
        name = utils.cleantext(name)
        if hd.find('HD') > 0:
            hd = " [COLOR orange]HD[/COLOR] "
        else:
            hd = " "
        urlid = re.search(r"(\d{2,})", img, re.DOTALL | re.IGNORECASE).group()
        videopage = "http://www.porntrex.com/media/nuevo/config.php?key=" + urlid + "-1-1"
        name = name + hd + "[COLOR deeppink]" + duration + "[/COLOR]"
        utils.addDownLink(name, videopage, 52, img, '')
    if not onelist:
        if re.search('class="prevnext">Next', listhtml, re.DOTALL | re.IGNORECASE):
            npage = page + 1        
            url = url.replace('page='+str(page),'page='+str(npage))
            utils.addDir('Next Page ('+str(npage)+')', url, 51, '', npage)
        xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:anton40,项目名称:WhiteCream-V0.0.1,代码行数:25,代码来源:porntrex.py

示例4: WXFList

def WXFList(url, page=1, onelist=None):
    if onelist:
        url = url.replace('/page/1/','/page/'+str(page)+'/')
    sort = getWXFSortMethod()
    if re.search('\?', url, re.DOTALL | re.IGNORECASE):
        url = url + '&filtre=' + sort + '&display=extract'
    else:
        url = url + '?filtre=' + sort + '&display=extract'
    try:
        listhtml = utils.getHtml(url, '')
    except Exception as e:
        return None
#    match = re.compile('src="([^"]+)" class="attachment-thumb_site.*?<a href="([^"]+)" title="([^"]+)".*?<p>([^<]+)</p>', re.DOTALL | re.IGNORECASE).findall(listhtml)
    match = re.compile('<article id=.*?<a href="([^"]+)" title="([^"]+)".*?<img data-src="([^"]+)" alt="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml) # Current as of 19.02.23
#    for img, videopage, name, desc in match:
    for videopage, name, img, desc in match:      # Current as of 19.02.23
        name = utils.cleantext(name)
        desc = utils.cleantext(desc)
        utils.addDownLink(name, videopage, 13, img, desc)
    if not onelist:
        if re.search('<link rel="next"', listhtml, re.DOTALL | re.IGNORECASE):
            npage = page + 1
            url = url.replace('/page/' + str(page) + '/', '/page/' + str(npage) + '/')
            utils.addDir('Next Page ('+str(npage)+')', url, 11, '', npage)
        xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:YourFriendCaspian,项目名称:dotfiles,代码行数:25,代码来源:watchxxxfree.py

示例5: List

def List(url):
    try:
        listhtml = utils.getHtml(url, '')
    except:
        
        return None
    match = re.compile('thumb-main-titre"><a href="..([^"]+)".*?title="([^"]+)".*?src="([^"]+)".*?<div class="thumb-info">(.*?)time">([^<]+)<', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for videourl, name, img, hd, duration in match:
        name = utils.cleantext(name)
        if hd.find('hd') > 0:
            if hd.find('full') > 0:
                hd = " [COLOR yellow]FULLHD[/COLOR] "
            else:
                hd = " [COLOR orange]HD[/COLOR] "
        else:
            hd = " "
        videopage = "http://www.absoluporn.com" + videourl
        videopage = videopage.replace(" ","%20")
        name = name + hd + "[COLOR deeppink]" + duration + "[/COLOR]"
        utils.addDownLink(name, videopage, 302, img, '')
    try:
        nextp=re.compile(r'<span class="text16">\d+</span> <a href="..([^"]+)"').findall(listhtml)[0]
        nextp = nextp.replace(" ","%20")
        utils.addDir('Next Page', 'http://www.absoluporn.com' + nextp, 301,'')
    except: pass    
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:YourFriendCaspian,项目名称:dotfiles,代码行数:26,代码来源:absoluporn.py

示例6: 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:anton40,项目名称:WhiteCream-V0.0.1,代码行数:7,代码来源:default.py

示例7: NFScenes

def NFScenes(url):
    scenehtml = utils.getHtml(url, '')
    match = re.compile('class="scene">.*?<img class="poster" src="([^"]+)".*?data-src="([^"]+)".*?<div class="description">[^>]+>([^<]+)<', re.DOTALL | re.IGNORECASE).findall(scenehtml)
    scenecount = 1
    for img, sceneurl, desc in match:
        name = 'Scene ' + str(scenecount)
        sceneurl = sceneurl.replace("&amp;","&")
        scenecount = scenecount + 1
        utils.addDownLink(name, sceneurl, 43, img, desc)        
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:anton40,项目名称:WhiteCream-V0.0.1,代码行数:10,代码来源:nudeflix.py

示例8: ListSearch

def ListSearch(url):
    html = utils.getHtml(url, '').replace('\n','')
    match = re.compile('bookmark">([^<]+)</a></h1>.*?<img src="([^"]+)".*?href="([^"]+)"').findall(html)
    for name, img, videopage in match:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 422, img, '')
    try:
        nextp = re.compile('<link rel="next" href="(.+?)" />', re.DOTALL | re.IGNORECASE).findall(html)
        utils.addDir('Next Page', nextp[0], 425,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:anton40,项目名称:WhiteCream-V0.0.1,代码行数:11,代码来源:xxxsorg.py

示例9: ChannelList

def ChannelList(url):
    listhtml = utils.getHtml(url, '')
    match = re.compile('<a href="([^"]+)" class="thumb" data-rt=".+?">.+?<img  width="220" height="165" src="([^"]+)" alt="([^"]+)"', re.DOTALL).findall(listhtml)
    for videopage, img, name in match:
        name = utils.cleantext(name)
        utils.addDownLink(name, 'http://www.hclips.com' + videopage, 382, img, '')
    try:
        nextp=re.compile('<li class="next">.+?<a href="([^"]+)".*?>Next</a>', re.DOTALL | re.IGNORECASE).findall(listhtml)
        utils.addDir('Next Page', 'http://www.hclips.com' + nextp[0], 386,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:YourFriendCaspian,项目名称:dotfiles,代码行数:11,代码来源:hclips.py

示例10: TPNSearchList

def TPNSearchList(url):
    listhtml = utils.getHtml(url, '')
    match = re.compile('class="item">.*?<a href="([^"]+)".*?src="([^"]+)" alt="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for videopage, img, name in match:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 122, img, '')
    try:
        nextp=re.compile('link rel="next" href="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml)
        next = nextp[0]
        utils.addDir('Next Page', next, 127,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:anton40,项目名称:WhiteCream-V0.0.1,代码行数:12,代码来源:thepornnation.py

示例11: List

def List(url):
    try:
        listhtml = utils.getHtml(url, '')
    except:
        return None
    match = re.compile('<div class="thumb">.*?href="([^"]+)".*?src="([^"]+)".*?alt="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for videopage, img, name in match:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 142, img, '')
    try:
        nextp=re.compile('<a class="nextpostslink" rel="next" href="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml)
        utils.addDir('Next Page', nextp[0], 141,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:YourFriendCaspian,项目名称:dotfiles,代码行数:14,代码来源:pelisxporno.py

示例12: List

def List(url, page=0):
    try:
        postRequest = {'page' : str(page)}
        response = utils.postHtml(url, form_data=postRequest,headers={},compression=False)
    except:
        return None
    match = re.compile('<div class="video-item">.*?a href="([^"]+)".*?<img src="([^"]+)" alt="([^"]+)".*?<span class="video-time">([^<]+)', re.DOTALL | re.IGNORECASE).findall(response)
    for video, img, name, length in match:
        video = 'https://daftsex.com' + video
        name = utils.cleantext(name) + ' [COLOR hotpink]' + length + '[/COLOR]'
        utils.addDownLink(name, video, 612, img, '')
    npage = page + 1
    utils.addDir('Next Page (' + str(npage) + ')', url, 611, '', npage)
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:YourFriendCaspian,项目名称:dotfiles,代码行数:14,代码来源:daftsex.py

示例13: List

def List(url):
    if utils.addon.getSetting("chaturbate") == "true":
        clean_database(False)
    try:
        data = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh','It looks like this website is down.')
        return None
    model_list = re.compile('int-each-hml">\s+<a class ="linkHandlerClass" title="([^"]+)" href="([^"]+)" target="">\s+<span[^<]+[^>]+>\s+<span[^<]+[^>]+>\s+<img[^<]+src="([^"]+)">\s+', re.DOTALL | re.IGNORECASE).findall(data)
    for model, url, img in model_list:
        name = model.replace("'s webcam","").strip()
        videourl = "http://new.naked.com" + url
        utils.addDownLink(name, videourl, 482, img, '', noDownload=True)
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:anton40,项目名称:WhiteCream-V0.0.1,代码行数:14,代码来源:naked.py

示例14: List

def List(url):
    try:
        html = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh','It looks like this website is down.')
        return None
    match = re.compile('<div class="entry-content">.*?<img src="([^"]+)".*?<a href="([^"]+)" class="more-link">.+?<span class="screen-reader-text">([^"]+)</span>', re.DOTALL | re.IGNORECASE).findall(html)
    for img, videopage, name in match:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 422, img, '')
    try:
        nextp = re.compile('<a class="next.*?href="(.+?)">', re.DOTALL | re.IGNORECASE).findall(html)
        utils.addDir('Next Page', nextp[0], 421,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:anton40,项目名称:WhiteCream-V0.0.1,代码行数:15,代码来源:xxxsorg.py

示例15: List

def List(url):
    if utils.addon.getSetting("chaturbate") == "true":
        clean_database(False)
    try:
        response = utils.getHtml(url)
    except:
        utils.notify('Oh oh','It looks like this website is down.')
        return None
    data = json.loads(response)
    for camgirl in data['results']:
        name = camgirl['slug'] + " [" + camgirl['status'] + "]"
        videourl = "https://www.camsoda.com/api/v1/video/vtoken/" + camgirl['slug'] + "?username=guest_" + str(random.randrange(100, 55555))
        img = "https:" + camgirl['thumb']
        utils.addDownLink(name, videourl, 478, img, '', noDownload=True)
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:anton40,项目名称:WhiteCream-V0.0.1,代码行数:15,代码来源:camsoda.py


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