Aggiunto canale tapmovie(sperimentale) e server annessi (hxfile, playtube, fix altri)
This commit is contained in:
+22
-7
@@ -1145,7 +1145,10 @@ def nextPage(itemlist, item, data='', patron='', function_or_level=1, next_page=
|
||||
if next_page != "":
|
||||
if resub: next_page = re.sub(resub[0], resub[1], next_page)
|
||||
if 'http' not in next_page:
|
||||
next_page = scrapertools.find_single_match(item.url, 'https?://[a-z0-9.-]+') + (next_page if next_page.startswith('/') else '/' + next_page)
|
||||
if '/' in next_page:
|
||||
next_page = scrapertools.find_single_match(item.url, 'https?://[a-z0-9.-]+') + (next_page if next_page.startswith('/') else '/' + next_page)
|
||||
else:
|
||||
next_page = '/'.join(item.url.split('/')[:-1]) + '/' + next_page
|
||||
next_page = next_page.replace('&', '&')
|
||||
logger.debug('NEXT= ', next_page)
|
||||
itemlist.append(
|
||||
@@ -1368,15 +1371,27 @@ def addQualityTag(item, itemlist, data, patron):
|
||||
info('nessun tag qualità trovato')
|
||||
|
||||
def get_jwplayer_mediaurl(data, srvName, onlyHttp=False, dataIsBlock=False):
|
||||
from core import jsontools
|
||||
|
||||
video_urls = []
|
||||
block = scrapertools.find_single_match(data, r'sources:\s*\[([^\]]+)\]') if not dataIsBlock else data
|
||||
block = scrapertools.find_single_match(data, r'sources:\s*([^\]]+\])') if not dataIsBlock else data
|
||||
if block:
|
||||
if 'file:' in block:
|
||||
sources = scrapertools.find_multiple_matches(block, r'file:\s*"([^"]+)"(?:,label:\s*"([^"]+)")?')
|
||||
elif 'src:' in block:
|
||||
sources = scrapertools.find_multiple_matches(block, r'src:\s*"([^"]+)",\s*type:\s*"[^"]+"(?:,[^,]+,\s*label:\s*"([^"]+)")?')
|
||||
json = jsontools.load(block)
|
||||
if json:
|
||||
sources = []
|
||||
for s in json:
|
||||
if 'file' in s.keys():
|
||||
src = s['file']
|
||||
else:
|
||||
src = s['src']
|
||||
sources.append((src, s.get('label')))
|
||||
else:
|
||||
sources =[(block.replace('"',''), '')]
|
||||
if 'file:' in block:
|
||||
sources = scrapertools.find_multiple_matches(block, r'file:\s*"([^"]+)"(?:,label:\s*"([^"]+)")?')
|
||||
elif 'src:' in block:
|
||||
sources = scrapertools.find_multiple_matches(block, r'src:\s*"([^"]+)",\s*type:\s*"[^"]+"(?:,[^,]+,\s*label:\s*"([^"]+)")?')
|
||||
else:
|
||||
sources =[(block.replace('"',''), '')]
|
||||
for url, quality in sources:
|
||||
quality = 'auto' if not quality else quality
|
||||
if url.split('.')[-1] != 'mpd':
|
||||
|
||||
Reference in New Issue
Block a user