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

Python utils.addDownLink函数代码示例

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

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



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


示例16: PHList

def PHList(url):
    try:
        listhtml = utils.getHtml(url, '')
    except:
        
        return None
    match = re.compile(r'anel-img">\s+<a href="([^"]+)">\s+<img.*?data-src="([^"]+)".*?alt="([^"]+)', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for videopage, img, name in match:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 72, img, '')
    try:
        nextp=re.compile('<a href="([^"]+)"[^>]+>Next', re.DOTALL | re.IGNORECASE).findall(listhtml)
        utils.addDir('Next Page', nextp[0],71,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:YourFriendCaspian,项目名称:dotfiles,代码行数:15,代码来源:pornhive.py


示例17: EXMoviesList

def EXMoviesList(url):
	url = 'https:'+url if url.startswith('//') else url
	listhtml = utils.getHtml(url, '')
	match = re.compile('<div class="container_neus">(.*?)<div id="pagination">', re.DOTALL | re.IGNORECASE).findall(listhtml)
	match1 = re.compile('<a title="([^"]+)" href="([^"]+)".*?src="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(match[0])
	for name, videopage, img in match1:  
		img = 'https:'+img if img.startswith('//') else img
		utils.addDownLink(name, videopage, 112, img, '')
	try:
		nextp=re.compile("<a href='([^']+)' title='([^']+)'>&raquo;</a>", re.DOTALL | re.IGNORECASE).findall(listhtml)
		next = urllib.quote_plus(nextp[0][0])
		next = next.replace(' ','+')
		utils.addDir('Next Page', os.path.split(url)[0] + '/' + next, 117,'')
	except: pass
	xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:YourFriendCaspian,项目名称:dotfiles,代码行数:15,代码来源:elreyx.py


示例18: 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(r'data-id="\d+" title="([^"]+)" href="([^"]+)".*?src="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(html)
    for name, videopage, img in match:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 412, img, '')
    try:
        nextp = re.compile('<link rel="next" href="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(html)
        utils.addDir('Next Page', nextp[0], 411,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:anton40,项目名称:WhiteCream-V0.0.1,代码行数:15,代码来源:xxxstreams.py


示例19: List

def List(url):
    try:
        listhtml = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh','It looks like this website is down.')
        return None
    match = re.compile(r"<a href='([^']+).*?src='([^']+)' id=\d+ alt='([^']+)'", re.DOTALL | re.IGNORECASE).findall(listhtml)
    for videopage, img, name in match:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 322, img, '')
    try:
        nextp = re.compile('href="([^"]+)">Next', re.DOTALL | re.IGNORECASE).findall(listhtml)
        utils.addDir('Next Page', nextp[0], 321,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:anton40,项目名称:WhiteCream-V0.0.1,代码行数:15,代码来源:anybunny.py


示例20: EXMoviesList

def EXMoviesList(url):
    listhtml = utils.getHtml(url, '')
    match = re.compile('<div class="container_news">(.*?)</div>', re.DOTALL | re.IGNORECASE).findall(listhtml)
    match1 = re.compile('<td.*?<a title="([^"]+)" href="([^"]+)".*?src="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(match[0])
    for name, videopage, img in match1:
        imgid = re.compile('(\d+)', re.DOTALL | re.IGNORECASE).findall(img)[0]
        img = 'http://images.panelporn.com/' + imgid + '.jpg'    
        utils.addDownLink(name, videopage, 112, img, '')
    try:
        nextp=re.compile("<a href='([^']+)' title='([^']+)'>&raquo;</a>", re.DOTALL | re.IGNORECASE).findall(listhtml)
        next = urllib.quote_plus(nextp[0][0])
        next = next.replace(' ','+')
        utils.addDir('Next Page', os.path.split(url)[0] + '/' + next, 117,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:anton40,项目名称:WhiteCream-V0.0.1,代码行数:15,代码来源:elreyx.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python utils.cleantext函数代码示例发布时间:2022-05-26
下一篇:
Python utils.addDir函数代码示例发布时间: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