Fix altaCommunity e aggiungi alla videoteca con autoplay attivo su alcuni canali
This commit is contained in:
@@ -129,7 +129,9 @@ def registerOrLogin():
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
import ast
|
||||
json = {}
|
||||
# debug = True
|
||||
|
||||
if item.contentType == 'undefined':
|
||||
disabletmdb = True
|
||||
@@ -140,17 +142,16 @@ def peliculas(item):
|
||||
action = 'episodios'
|
||||
|
||||
if '/load-more-film' not in item.url and '/search' not in item.url: # generi o altri menu, converto
|
||||
import ast
|
||||
ajax = support.match(item.url, patron='ajax_data\s*=\s*"?\s*([^;]+)', cloudscraper=True).match
|
||||
item.url = host + '/load-more-film?' + support.urlencode(ast.literal_eval(ajax)) + '&page=1'
|
||||
if not '/search' in item.url:
|
||||
if '/search' not in item.url:
|
||||
json = support.httptools.downloadpage(item.url, headers=headers, cloudscraper=True).json
|
||||
data = "\n".join(json['data'])
|
||||
else:
|
||||
json = support.httptools.downloadpage(item.url, headers=headers, cloudscraper=True).json
|
||||
data = "\n".join(json['data'])
|
||||
patron = r'wrapFilm">\s*<a href="(?P<url>[^"]+)">\s*<span class="year">(?P<year>[0-9]{4})</span>\s*<span[^>]+>[^<]+</span>\s*<span class="qual">(?P<quality>[^<]+).*?<img src="(?P<thumbnail>[^"]+)[^>]+>\s*<h3>(?P<title>[^<[]+)(?:\[(?P<lang>[sSuUbBiItTaA-]+))?'
|
||||
|
||||
patron = 'wrapFilm">\s*<a href="(?P<url>[^"]+)">\s*<span class="year">(?P<year>[0-9]{4})</span>\s*<span[^>]+>[^<]+</span>\s*<span class="qual">(?P<quality>[^<]+).*?<img src="(?P<thumbnail>[^"]+)[^>]+>\s*</div>\s*<h3>(?P<title>[^<[]+)(?:\[(?P<lang>[sSuUbBiItTaA-]+))?'
|
||||
# paginazione
|
||||
if json.get('have_next'):
|
||||
def fullItemlistHook(itemlist):
|
||||
|
||||
@@ -27,7 +27,7 @@ def start(itemlist, item):
|
||||
:return: try to auto-reproduce, in case of failure it returns the itemlist that it received in the beginning
|
||||
'''
|
||||
|
||||
if item.global_search:
|
||||
if item.global_search or item.from_action: # from_action means that's a special function calling this (ex: add to videolibrary)
|
||||
return itemlist
|
||||
logger.debug()
|
||||
|
||||
|
||||
@@ -18,9 +18,10 @@ def test_video_exists(page_url):
|
||||
|
||||
referer = {"Referer": page_url}
|
||||
|
||||
data = httptools.downloadpage(page_url, headers=referer).data
|
||||
page = httptools.downloadpage(page_url, headers=referer)
|
||||
data = page.data
|
||||
|
||||
if "Video not found" in data:
|
||||
if "Video not found" in data or page.code >= 400:
|
||||
return False, config.get_localized_string(70449) % 'Streamtape'
|
||||
|
||||
return True, ""
|
||||
|
||||
Reference in New Issue
Block a user