diff options
author | Sergey M․ <dstftw@gmail.com> | 2019-05-11 03:56:22 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2019-05-11 03:57:40 +0700 |
commit | 3089bc748c0fe72a0361bce3f5e2fbab25175236 (patch) | |
tree | 2dbe8468137470f25f851b8d06778e2dcab87d25 /youtube_dl/extractor/youtube.py | |
parent | d23e85515a8f58e276e8ac07bf1fa19f4f1aaec8 (diff) |
Fix W504 and disable W503 (closes #20863)
Diffstat (limited to 'youtube_dl/extractor/youtube.py')
-rw-r--r-- | youtube_dl/extractor/youtube.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 8619f3838..06005f8d2 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -2052,8 +2052,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor): url_or_none(try_get( player_response, lambda x: x['streamingData']['hlsManifestUrl'], - compat_str)) or - url_or_none(try_get( + compat_str)) + or url_or_none(try_get( video_info, lambda x: x['hlsvp'][0], compat_str))) if manifest_url: formats = [] @@ -2102,10 +2102,10 @@ class YoutubeIE(YoutubeBaseInfoExtractor): self._downloader.report_warning('unable to extract uploader nickname') channel_id = ( - str_or_none(video_details.get('channelId')) or - self._html_search_meta( - 'channelId', video_webpage, 'channel id', default=None) or - self._search_regex( + str_or_none(video_details.get('channelId')) + or self._html_search_meta( + 'channelId', video_webpage, 'channel id', default=None) + or self._search_regex( r'data-channel-external-id=(["\'])(?P<id>(?:(?!\1).)+)\1', video_webpage, 'channel id', default=None, group='id')) channel_url = 'http://www.youtube.com/channel/%s' % channel_id if channel_id else None @@ -2564,9 +2564,9 @@ class YoutubePlaylistIE(YoutubePlaylistBaseInfoExtractor): search_title = lambda class_name: get_element_by_attribute('class', class_name, webpage) title_span = ( - search_title('playlist-title') or - search_title('title long-title') or - search_title('title')) + search_title('playlist-title') + or search_title('title long-title') + or search_title('title')) title = clean_html(title_span) return self.playlist_result(url_results, playlist_id, title) |