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

Python utils.addDir函数代码示例

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

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



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

示例1: pornvibe_cat

def pornvibe_cat(url):
	listhtml = utils.getHtml(url)
	match = re.compile('''<img src="([^"]+)" alt="([^"]+)">.+?href="([^"]+)".*?<p>([^&]+)&''', re.DOTALL | re.IGNORECASE).findall(listhtml)
	for img, name, catpage, count in sorted(match, key=lambda x: x[1].strip().lower()):
		name = utils.cleantext(name.strip()) + " [COLOR deeppink]" + count.strip() + " videos[/COLOR]"
		utils.addDir(name, catpage, 681, img, 1)
	xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:YourFriendCaspian,项目名称:dotfiles,代码行数:7,代码来源:pornvibe.py


示例2: TPNCat

def TPNCat(url, index):
    cathtml = utils.getHtml(url, '')
    match = re.compile('<ul class="scrolling cat(.*?)</ul>', re.DOTALL | re.IGNORECASE).findall(cathtml)
    match1 = re.compile('href="([^"]+)[^>]+>([^<]+)<', re.DOTALL | re.IGNORECASE).findall(match[index])
    for catpage, name in match1:
        utils.addDir(name, catpage, 121, '')
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:anton40,项目名称:WhiteCream-V0.0.1,代码行数:7,代码来源:thepornnation.py


示例3: Categories

def Categories():
    cathtml = utils.getHtml('https://www.vporn.com/', '')
    match = re.compile('<li><a href="/cat/(.+?)"><img .*>(.+?)</a></li>').findall(cathtml)
    for catid, name in match[1:]:
        catpage = "https://www.vporn.com/cat/"+ catid
        utils.addDir(name, catpage, 501, '')
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:anton40,项目名称:WhiteCream-V0.0.1,代码行数:7,代码来源:vporn.py


示例4: Main

def Main():
    utils.addDir('[COLOR red]Refresh bongacams.com images[/COLOR]','',523,'',Folder=False)
    utils.addDir('[COLOR hotpink]Female[/COLOR]','http://tools.bongacams.com/promo.php?c=226355&type=api&api_type=json&categories[]=female',521,'','')
    utils.addDir('[COLOR hotpink]Male[/COLOR]','http://tools.bongacams.com/promo.php?c=226355&type=api&api_type=json&categories[]=male',521,'','')
    utils.addDir('[COLOR hotpink]Transsexual[/COLOR]','http://tools.bongacams.com/promo.php?c=226355&type=api&api_type=json&categories[]=transsexual',521,'','')
    utils.addDir('[COLOR hotpink]Couples[/COLOR]','http://tools.bongacams.com/promo.php?c=226355&type=api&api_type=json&categories[]=couples',521,'','')
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:YourFriendCaspian,项目名称:dotfiles,代码行数:7,代码来源:bongacams.py


示例5: 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.bubbaporn.com" + caturl + "page1.html"
        utils.addDir(cat, caturl, 91, thumb, 1)
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:anton40,项目名称:WhiteCream-V0.0.1,代码行数:7,代码来源:bubbaporn.py


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


示例7: 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 deeppink]' + videos + ' videos[/COLOR]'
        utils.addDir(name, catpage, 131, img)
    xbmcplugin.endOfDirectory(utils.addon_handle)   
开发者ID:anton40,项目名称:WhiteCream-V0.0.1,代码行数:7,代码来源:xvideospanish.py


示例8: EROCat

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


示例9: 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


示例10: Categories

def Categories(url):
    cathtml = utils.getHtml(url, '')
    match = re.compile('href="([^"]+)" class="thumb">.*?src="([^"]+)"[^<]+<strong class="title">([^<]+)<.*?<b>([^<]+)<', re.DOTALL | re.IGNORECASE).findall(cathtml)
    for catpage, img, name, vids in match:
        name = '%s [COLOR deeppink]%s videos[/COLOR]' %(name, vids)
        utils.addDir(name, catpage, 381, img, '')
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:YourFriendCaspian,项目名称:dotfiles,代码行数:7,代码来源:hclips.py


示例11: EXCat

def EXCat(url):
    cathtml = utils.getHtml(url, '')
    match = re.compile('<div id="categories" class="hidden-xs"(?:>| style="display:none;">)(.*?)</div>', 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, 111, '')
    xbmcplugin.endOfDirectory(utils.addon_handle)   
开发者ID:YourFriendCaspian,项目名称:dotfiles,代码行数:7,代码来源:elreyx.py


示例12: 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


示例13: Categories

def Categories(url):
    cathtml = utils.getHtml(url, '')
    match = re.compile('<li class="cat-item.+?"><a href="(.+?)" title=".+?">(.+?)</a> \((.+?)\)', re.DOTALL | re.IGNORECASE).findall(cathtml)
    for catpage, name, videos in match:
        name = name + ' [COLOR deeppink](%s)[/COLOR]' % videos
        utils.addDir(name, catpage, 471, '')
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:anton40,项目名称:WhiteCream-V0.0.1,代码行数:7,代码来源:pornkinox.py


示例14: Cat

def Cat(url):
    listhtml = utils.getHtml(url, '')
    match = re.compile('<a class="item" href="([^"]+)" title="([^"]+)".*?data-original="([^"]+)".*?videos">([^<]+)<', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for catpage, name, img, videos in match:
        name = utils.cleantext(name) + " [COLOR deeppink]" + videos + "[/COLOR]"
        utils.addDir(name, catpage, 361, img, '')
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:anton40,项目名称:WhiteCream-V0.0.1,代码行数:7,代码来源:tubepornclassic.py


示例15: 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


示例16: pl_cat

def pl_cat(url):
    listhtml = utils.getHtml(url, 'https://porns.land/')
    match = re.compile('<div class="category".*?href="([^"]+)".*?data-original="([^"]+)".*?alt="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for catpage, img, name in match:
        name = utils.cleantext(name)
        utils.addDir(name, catpage, 621, img, 1)
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:YourFriendCaspian,项目名称:dotfiles,代码行数:7,代码来源:pornsland.py


示例17: Categories

def Categories(url):
    cathtml = utils.getHtml(url, hdr=xhamster_headers)
    match0 = re.compile('<div class="letter-blocks page">(.*?)<footer>', re.DOTALL | re.IGNORECASE).findall(cathtml)
    match = re.compile('<a href="(.+?)" >([^<]+)<').findall(match0[0])
    for url, name in match:
        utils.addDir(name, url, 506, '')
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:YourFriendCaspian,项目名称:dotfiles,代码行数:7,代码来源:xhamster.py


示例18: 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


示例19: EXMovies

def EXMovies(url):
    cathtml = utils.getHtml(url, '')
    match = re.compile('<div id="movies">(.*?)</div>', 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, 117, '')
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:anton40,项目名称:WhiteCream-V0.0.1,代码行数:7,代码来源:elreyx.py


示例20: 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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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