From c428c3897189336f4ac6e1b6f4762cf9dd5e710e Mon Sep 17 00:00:00 2001
From: JChris246 <43832407+JChris246@users.noreply.github.com>
Date: Wed, 23 Jan 2019 16:54:08 -0400
Subject: [PATCH] Validated with flake8
---
youtube_dl/extractor/yourporn.py | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/youtube_dl/extractor/yourporn.py b/youtube_dl/extractor/yourporn.py
index f2ac24152..466124d6e 100644
--- a/youtube_dl/extractor/yourporn.py
+++ b/youtube_dl/extractor/yourporn.py
@@ -23,7 +23,7 @@ class YourPornIE(InfoExtractor):
'id': '5c2d2fde03bc5',
'ext': 'mp4',
'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$',
'age_limit': 18,
'duration': 5403
@@ -47,15 +47,17 @@ class YourPornIE(InfoExtractor):
if '#' in title:
title = title[0:title.index('#')].strip()
thumbnail = self._og_search_thumbnail(webpage)
- durationraw = self._search_regex(r'Video Info -> duration:([0-9:]+)',
- webpage, 'duration')
- if len(durationraw.split(":")) == 3:
- duration = int((durationraw.split(":")[0])) * 3600 + \
- int((durationraw.split(":")[1])) * 60 + int((durationraw.split(":")[2]))
- elif len(durationraw.split(":")) == 2:
- duration = int((durationraw.split(":")[0])) * 60 + int((durationraw.split(":")[1]))
+ duration_raw = self._search_regex(r'Video Info -> duration:([0-9:]+)',
+ webpage, 'duration')
+ if len(duration_raw.split(":")) == 3:
+ duration = int((duration_raw.split(":")[0])) * 3600 + \
+ int((duration_raw.split(":")[1])) * 60 + \
+ int((duration_raw.split(":")[2]))
+ elif len(duration_raw.split(":")) == 2:
+ duration = int((duration_raw.split(":")[0])) * 60 + \
+ int((duration_raw.split(":")[1]))
else:
- duration = int((durationraw.split(":")[1]))
+ duration = int((duration_raw.split(":")[1]))
return {
'id': video_id,