1
0
mirror of https://github.com/l1ving/youtube-dl synced 2020-11-18 19:53:54 -08:00

Rank flake8

This commit is contained in:
LexManos 2020-01-10 12:24:04 -08:00
parent 8e1b235c0e
commit 58fbc02cc6

View File

@ -140,13 +140,13 @@ class GoIE(AdobePassIE):
# https://abc.com/shows/the-rookie/episode-guide/season-02/03-the-bet # https://abc.com/shows/the-rookie/episode-guide/season-02/03-the-bet
r'\b(?:video)?id["\']\s*:\s*["\'](VDKA\w+)' r'\b(?:video)?id["\']\s*:\s*["\'](VDKA\w+)'
), webpage, 'video id', default=[video_id]) ), webpage, 'video id', default=[video_id])
# Remove duplicates and nulls # Remove duplicates and nulls
if video_id: if video_id:
tmp = [] tmp = []
[tmp.append(x) for x in video_id if x and x not in tmp] [tmp.append(x) for x in video_id if x and x not in tmp]
video_id = tmp video_id = tmp
if not site_info: if not site_info:
brand = self._search_regex( brand = self._search_regex(
(r'data-brand=\s*["\']\s*(\d+)', (r'data-brand=\s*["\']\s*(\d+)',
@ -167,23 +167,23 @@ class GoIE(AdobePassIE):
video['url'], 'Go', video.get('id'), video.get('title'))) video['url'], 'Go', video.get('id'), video.get('title')))
entries.reverse() entries.reverse()
return self.playlist_result(entries, show_id, show_title) return self.playlist_result(entries, show_id, show_title)
if not isinstance(video_id, list): if not isinstance(video_id, list):
video_id = [video_id] video_id = [video_id]
entries = [] entries = []
for id in video_id: for id in video_id:
entry = self._real_extract_single(id, site_info, brand) entry = self._real_extract_single(url, id, site_info, brand)
if entry: if entry:
entries.append(entry) entries.append(entry)
if len(entries) == 0: if len(entries) == 0:
return None return None
elif len(entries) == 1: elif len(entries) == 1:
return entries[0] return entries[0]
return self.playlist_result(entries) return self.playlist_result(entries)
def _real_extract_single(self, video_id, site_info, brand): def _real_extract_single(self, url, video_id, site_info, brand):
video_data = self._extract_videos(brand, video_id)[0] video_data = self._extract_videos(brand, video_id)[0]
video_id = video_data['id'] video_id = video_data['id']
title = video_data['title'] title = video_data['title']