aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2020-06-16 02:43:09 +0700
committerSergey M․ <dstftw@gmail.com>2020-06-16 02:43:09 +0700
commita6211d237b4e7051ca018cc09440502561fedaa7 (patch)
tree468f25ddf7a37a200738fcf759cb57b75a498fc0 /youtube_dl
parent7b16239a490a0d8784375895b620598bfccf0ede (diff)
[youtube] Fix uploader id and uploader URL extraction
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/youtube.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index aaa4023b4..ce2212a7c 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -2230,6 +2230,13 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
if mobj is not None:
video_uploader_id = mobj.group('uploader_id')
video_uploader_url = mobj.group('uploader_url')
+ else:
+ owner_profile_url = url_or_none(microformat.get('ownerProfileUrl'))
+ if owner_profile_url:
+ video_uploader_id = self._search_regex(
+ r'(?:user|channel)/([^/]+)', owner_profile_url, 'uploader id',
+ default=None)
+ video_uploader_url = owner_profile_url
channel_id = (
str_or_none(video_details.get('channelId'))