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

Python utils.cleantext函数代码示例

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

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



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

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


示例2: Categories

def Categories(url):
    listhtml = utils.getHtml(url, '')
    match = re.compile('<a href="(.+?)" title=".+?">\n.+?<div class="thumb">\n.+?<img class="thumb" src="(.+?)" alt="(.+?)"/>').findall(listhtml)
    for catpage, img, name in match:
        name = utils.cleantext(name)
        utils.addDir(name, catpage, 341, img, '')
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:opesboy,项目名称:WhiteCream-V0.0.1,代码行数:7,代码来源:hdzog.py


示例3: Cat

def Cat(url):
    listhtml = utils.getHtml(url, '')
    match = re.compile('<li><a href="([^"]+)" rel="tag">([^<]+)<', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for catpage, name in match:
        name = utils.cleantext(name)
        utils.addDir(name, catpage, 371, '', '')
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:opesboy,项目名称:WhiteCream-V0.0.1,代码行数:7,代码来源:freeomovie.py


示例4: Cat

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


示例5: XTList

def XTList(url, page):
    sort = getXTSortMethod()
    if re.search('\?', url, re.DOTALL | re.IGNORECASE):
        url = url + '&filtre=' + sort
    else:
        url = url + '?filtre=' + sort
    print url
    listhtml = utils.getHtml(url, '')
    match = re.compile('src="([^"]+?)" class="attachment.*?<a href="([^"]+)" title="([^"]+)".*?<div class="right">.<p>([^<]+)</p>', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for img, videopage, name, desc in match:
        name = utils.cleantext(name)
        desc = utils.cleantext(desc)
        utils.addDownLink(name, videopage, 23, img, desc)
    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, 21, '', npage)
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:natonatonato,项目名称:WhiteCream-V0.0.1,代码行数:18,代码来源:xtheatre.py


示例6: WXFList

def WXFList(url, page):
    sort = getWXFSortMethod()
    if re.search('\?', url, re.DOTALL | re.IGNORECASE):
        url = url + '&filtre=' + sort + '&display=extract'
    else:
        url = url + '?filtre=' + sort + '&display=extract'
    print url
    listhtml = utils.getHtml(url, '')
    match = re.compile('src="([^"]+)"[^<]+</noscript>.*?<a href="([^"]+)" title="([^"]+)".*?<p>([^<]+)</p>', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for img, videopage, name, desc in match:
        name = utils.cleantext(name)
        desc = utils.cleantext(desc)
        utils.addDownLink(name, videopage, 13, img, desc)
    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:natonatonato,项目名称:WhiteCream-V0.0.1,代码行数:18,代码来源:watchxxxfree.py


示例7: ListSearch

def ListSearch(url):
    html = utils.getHtml(url, '').replace('\n','')
    match = re.compile('<p>(.+?)</p><p>.+?<img src="(.+?)".*?/>.*?</a>.*?<a href="(.+?)" class="more-link">').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:dubhead1,项目名称:WhiteCream-V0.0.1,代码行数:11,代码来源:xxxsorg.py


示例8: List

def List(url):
    listhtml = utils.getHtml(url, '')
    match = re.compile(r'class="content-list-thumb">\s+<a href="([^"]+)" title="([^"]+)">.*?src="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for videopage, name, img in match:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 232, img, '')
    try:
        nextp=re.compile('next page-numbers" href="([^"]+)">&raquo;', re.DOTALL | re.IGNORECASE).findall(listhtml)[0]
        utils.addDir('Next Page', nextp, 231,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:Mirocow,项目名称:WhiteCream-V0.0.2,代码行数:11,代码来源:k18.py


示例9: P00List

def P00List(url, page):
    listhtml = utils.getHtml(url, '')
    match = re.compile('src="([^"]+)" class="attachment-primary-post-thumbnail wp-post-image".*?<a title="([^"]+)" href="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for img, name, videopage in match:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 62, img, '')
    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, 65, '', npage)
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:natonatonato,项目名称:WhiteCream-V0.0.1,代码行数:11,代码来源:hdporn.py


示例10: List

def List(url):
    listhtml = utils.getHtml(url, '')
    match = re.compile(r'<div class="quadrato">\s*?<a href="([^"]+)"\s*?title="([^"]+)".*?src="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for videopage, name, img in match:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 172, img, '')
    try:
        nextp=re.compile(r"""current(?:"|')>\d+</span><a.*?href=(?:"|')([^'"]+)""", re.DOTALL | re.IGNORECASE).findall(listhtml)[0]
        utils.addDir('Next Page', nextp, 171,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:iamlegend2525,项目名称:WhiteCream-V0.0.1,代码行数:11,代码来源:streamxxx.py


示例11: List

def List(url):
    listhtml = utils.getHtml(url, '')
    match = re.compile('<h2><a href="([^"]+)".*?title="([^"]+)">.+?<img src="([^"]+)".+? width="', re.DOTALL).findall(listhtml)
    for videopage, name, img in match:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 372, img, '')
    try:
        nextp = re.compile('<span class=\'current\'>.+?</span><a class="page larger" href="([^"]+)"').findall(listhtml)
        utils.addDir('Next Page', nextp[0], 371,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:opesboy,项目名称:WhiteCream-V0.0.1,代码行数:11,代码来源:freeomovie.py


示例12: List

def List(url):
    listhtml = utils.getHtml(url, '')
    match = re.compile(r'<a class="thumbnail" href="(.+?)">\n<script.+?</script>\n<figure>\n<img  id=".+?" src="(.+?)".+?/>\n<figcaption>\n<span class="video-icon"><i class="fa fa-play"></i></span>\n<span class="duration"><i class="fa fa-clock-o"></i>(.+?)</span>\n(.+?)\n').findall(listhtml)
    for videopage, img, duration, name in match:
        name = utils.cleantext(name) + ' ' + duration
        utils.addDownLink(name, 'http://www.mrsexe.com/' + videopage, 402, img, '')
    try:
        nextp=re.compile(r'<li class="arrow"><a href="(.+?)">suivant</li>').findall(listhtml)
        utils.addDir('Next Page', 'http://www.mrsexe.com/' + nextp[0], 401,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:opesboy,项目名称:WhiteCream-V0.0.1,代码行数:11,代码来源:mrsexe.py


示例13: List

def List(url):
    listhtml = utils.getHtml(url, '')
    match = re.compile('<a class="" href="(.+?)" title="(.+?)">\n<img src="(.+?)" class="has-image" alt=".+?"/>', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for videopage, name, img in match:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 352, img, '')
    try:
        nextp=re.compile('<li class="disabled active"><span class="active">.+?</span></li><li><a href="(.+?)"', re.DOTALL | re.IGNORECASE).findall(listhtml)
        utils.addDir('Next Page', nextp[0], 351,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:NothingGnome,项目名称:WhiteCream-V0.0.1,代码行数:11,代码来源:cat3movie.py


示例14: List

def List(url):
    listhtml = utils.getHtml(url, '')
    match = re.compile('<li>\n.+?<a href="(.+?)" title="(.+?)">\n.+?<div class="thumb thumb-paged" data-screen-main="1">\n\n.+?<img src="(.+?)"').findall(listhtml)
    for videopage, name, img in match:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 342, img, '')
    try:
        nextp=re.compile('<a href="(.+?)" title="Next Page" data-page-num.+?>Next page').findall(listhtml)
        utils.addDir('Next Page', 'http://www.hdzog.com' + nextp[0], 341,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:opesboy,项目名称:WhiteCream-V0.0.1,代码行数:11,代码来源:hdzog.py


示例15: List

def List(url):
    html = utils.getHtml(url, '')
    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('<a class="nextpostslink" rel="next" href="(.+?)">', re.DOTALL | re.IGNORECASE).findall(html)
        utils.addDir('Next Page', nextp[0], 411,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:RaspberryMCAdmin,项目名称:DevProjects,代码行数:11,代码来源:xxxstreams.py


示例16: List

def List(url):
    listhtml = utils.getHtml(url, '')
    match = re.compile('<div id="post-.*?<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, 182, img, '')
    try:
        nextp=re.compile('<a class="nextpostslink" rel="next" href="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml)
        utils.addDir('Next Page', nextp[0], 181,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:Fr33m1nd,项目名称:WhiteCream-V0.0.1,代码行数:11,代码来源:javhdonline.py


示例17: List

def List(url):
    html = utils.getHtml(url, '')
    match = re.compile('<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="nextpostslink" rel="next" href="(.+?)">', re.DOTALL | re.IGNORECASE).findall(html)
        utils.addDir('Next Page', nextp[0], 421,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:johnloveszoe,项目名称:WhiteCream-V0.0.1,代码行数:11,代码来源:xxxsorg.py


示例18: PHList

def PHList(url):
    listhtml = utils.getHtml(url, '')
    match = re.compile('panel-img">.*?<a href="([^"]+)" title="([^"]+)".*?src="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for videopage, name, img 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:dreamykun,项目名称:WhiteCream-V0.0.1,代码行数:11,代码来源:pornhive.py


示例19: List

def List(url):
    listhtml = utils.getHtml(url, '')
    match = re.compile('<div class="photo-thumb-image.*?href="([^"]+)".*?title="([^"]+)".*?src="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for videopage, name, img in match:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 233, img, '')
    try:
        nextp=re.compile('<a class="nextpostslink" rel="next" href="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml)
        nextp = nextp[0].replace("&#038;", "&")
        utils.addDir('Next Page', nextp, 232,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:RaspberryMCAdmin,项目名称:DevProjects,代码行数:12,代码来源:playporn.py


示例20: YFTList

def YFTList(url):
    listhtml = utils.getHtml(url, '')
    match = re.compile('<a href="([^"]+)"[^<]+<[^<]+<img src="([^"]+)" alt="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for videopage, img, name in match:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 192, img, '')
    try:
        nextp=re.compile('<a href="([^"]+)">&raquo;', re.DOTALL | re.IGNORECASE).findall(listhtml)
        nextp = "http://www.yourfreetube.net/" + nextp[0]
        utils.addDir('Next Page', nextp, 191,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
开发者ID:Fr33m1nd,项目名称:WhiteCream-V0.0.1,代码行数:12,代码来源:yourfreetube.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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