Nuovo metoto anti CF -> fix ilgenio

This commit is contained in:
marco
2020-12-08 17:50:24 +01:00
parent 702d89ff51
commit 0d8af39a0c
4 changed files with 114 additions and 64 deletions
+12 -21
View File
@@ -47,7 +47,7 @@ def mainlist(item):
@support.scrape
def peliculas(item):
info()
# debug = True
# debugBlock = True
if item.args == 'search':
patronBlock = r'<div class="search-page">(?P<block>.*?)<footer class="main">'
@@ -104,7 +104,7 @@ def episodios(item):
patron = r'<a href="(?P<url>[^"]+)"><img src="(?P<thumb>[^"]+)">.*?'\
'<div class="numerando">(?P<episode>[^<]+).*?<div class="episodiotitle">'\
'[^>]+>(?P<title>[^<]+)<\/a>'
# debug = True
# debug = True
return locals()
@support.scrape
@@ -128,25 +128,16 @@ def search(item, text):
info(text)
itemlist = []
text = text.replace(' ', '+')
item.url = host + "/wp-json/wp/v2/search?per_page=100&search=" + text
results = support.httptools.downloadpage(item.url).json
for r in results:
title = r['title']
longtitle = support.typo(title, 'bold')
if '[sub-ita]' in title.lower():
longtitle += support.typo('Sub-ITA', '_ [] color kod')
title = title.split('[')[0]
itemlist.append(item.clone(action='findvideos' if r['subtype'] == 'movies' else 'episodios',
title=longtitle,
fulltitle=title,
show=title,
contentTitle=title,
contentSerieName=title,
contentType='movie' if r['subtype'] == 'movies' else 'tvshow',
url=r['url']))
# support.dbg()
support.tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
return itemlist
item.url = host + "?s=" + text
# try:
item.args = 'search'
return peliculas(item)
# except:
# import sys
# for line in sys.exc_info():
# info("%s" % line)
return []
def newest(categoria):
info(categoria)