- Fix Piratestreaming

- Normalizzazione numerazione episodi
This commit is contained in:
Alhaziel01
2021-03-17 12:18:57 +01:00
parent 4a64642ad0
commit 2251d3030e
2 changed files with 3 additions and 2 deletions

View File

@@ -78,7 +78,7 @@ def episodios(item):
if item.data: data = item.data
# debug= True
title = item.fulltitle
patron = r'link-episode">(?:\s*<strong>)?\s*(?P<episode>\d+.\d+(?:.\d+)?)(?:\s*\((?P<lang>[?P<lang>A-Za-z-]+)[^>]+>)?(?:\s*(?P<title>.*?) )[^>]+<\/span>\s*(?P<url>.*?)</div>'
patron = r'link-episode">(?:\s*<strong>)?\s*(?P<episode>\d+.\d+(?:.\d+)?)(?:\s*\((?P<lang>[?P<lang>A-Za-z-]+)[^>]+>)?(?:\s*(?P<title>[^-<]+))[^>]+</span>\s*(?P<url>.*?)</div>'
def itemHook(item):
if 'Episodio' in item.title:
item.title = support.re.sub(r'Episodio [0-9.-]+', title, item.title)

View File

@@ -261,6 +261,7 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t
infolabels['rating'] = scrapertools.decodeHtmlentities(scraped["rating"])
episode = ''
if not group or item.grouped:
if scraped['season'] and scraped['episode']:
stagione = scraped['season']
@@ -277,7 +278,7 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t
elif item.season:
infolabels['season'] = int(item.season)
infolabels['episode'] = int(scrapertools.find_single_match(scraped['episode'], r'(\d+)'))
episode = item.season +'x'+ scraped['episode']
episode = item.season +'x'+ scraped['episode'].zfill(2)
elif item.contentType == 'tvshow' and (scraped['episode'] == '' and scraped['season'] == '' and stagione == ''):
item.news = 'season_completed'
episode = ''