Validated with flake8

This commit is contained in:
JChris246 2019-01-23 16:54:08 -04:00 committed by GitHub
parent 92a8be2ebf
commit c428c38971
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,7 @@ class YourPornIE(InfoExtractor):
'id': '5c2d2fde03bc5', 'id': '5c2d2fde03bc5',
'ext': 'mp4', 'ext': 'mp4',
'title': 'Busty 7 - Nubile Films (2018) - Chanel Preston, ' 'title': 'Busty 7 - Nubile Films (2018) - Chanel Preston, '
+ 'Crystal Swift, Jennifer Amton, Shay Evan', 'Crystal Swift, Jennifer Amton, Shay Evan',
'thumbnail': r're:^https?://.*\.jpg$', 'thumbnail': r're:^https?://.*\.jpg$',
'age_limit': 18, 'age_limit': 18,
'duration': 5403 'duration': 5403
@ -47,15 +47,17 @@ class YourPornIE(InfoExtractor):
if '#' in title: if '#' in title:
title = title[0:title.index('#')].strip() title = title[0:title.index('#')].strip()
thumbnail = self._og_search_thumbnail(webpage) thumbnail = self._og_search_thumbnail(webpage)
durationraw = self._search_regex(r'Video Info -> duration:<b>([0-9:]+)</b>', duration_raw = self._search_regex(r'Video Info -> duration:<b>([0-9:]+)</b>',
webpage, 'duration') webpage, 'duration')
if len(durationraw.split(":")) == 3: if len(duration_raw.split(":")) == 3:
duration = int((durationraw.split(":")[0])) * 3600 + \ duration = int((duration_raw.split(":")[0])) * 3600 + \
int((durationraw.split(":")[1])) * 60 + int((durationraw.split(":")[2])) int((duration_raw.split(":")[1])) * 60 + \
elif len(durationraw.split(":")) == 2: int((duration_raw.split(":")[2]))
duration = int((durationraw.split(":")[0])) * 60 + int((durationraw.split(":")[1])) elif len(duration_raw.split(":")) == 2:
duration = int((duration_raw.split(":")[0])) * 60 + \
int((duration_raw.split(":")[1]))
else: else:
duration = int((durationraw.split(":")[1])) duration = int((duration_raw.split(":")[1]))
return { return {
'id': video_id, 'id': video_id,