mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-09 22:17:15 +08:00
Update youtube.py
This commit is contained in:
parent
850043babb
commit
ddc928571a
@ -2100,12 +2100,13 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
else:
|
else:
|
||||||
self._downloader.report_warning('unable to extract uploader nickname')
|
self._downloader.report_warning('unable to extract uploader nickname')
|
||||||
|
|
||||||
channel_id = None
|
channel_id = (
|
||||||
if video_details:
|
str_or_none(video_details.get('channelId')) or
|
||||||
channel_id = str_or_none(video_details.get('channelId'))
|
self._html_search_meta(
|
||||||
if channel_id is None:
|
'channelId', video_webpage, 'channel id', default=None) or
|
||||||
channel_id = self._html_search_meta(
|
self._search_regex(
|
||||||
'channelId', video_webpage, 'channel id')
|
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
|
channel_url = 'http://www.youtube.com/channel/%s' % channel_id if channel_id else None
|
||||||
|
|
||||||
# thumbnail image
|
# thumbnail image
|
||||||
|
Loading…
x
Reference in New Issue
Block a user