Merge branch 'master' into alpha

# Conflicts:
#	service.py
This commit is contained in:
mac12m99
2021-05-21 20:34:14 +02:00
15 changed files with 76 additions and 55 deletions
+3 -3
View File
@@ -244,11 +244,11 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t
if scraped["plot"]:
infolabels['plot'] = plot
if scraped['duration']:
matches = scrapertools.find_multiple_matches(scraped['duration'],
dur = scrapertools.find_multiple_matches(scraped['duration'],
r'([0-9])\s*?(?:[hH]|:|\.|,|\\|\/|\||\s)\s*?([0-9]+)')
for h, m in matches:
for h, m in dur:
scraped['duration'] = int(h) * 60 + int(m)
if not matches:
if not dur:
scraped['duration'] = scrapertools.find_single_match(scraped['duration'], r'(\d+)')
try:
infolabels['duration'] = int(scraped['duration']) * 60