Skip to content

Commit

Permalink
[youtube] Fix uploader id and uploader URL extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
dstftw committed Jun 15, 2020
1 parent 7b16239 commit a6211d2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions youtube_dl/extractor/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -2230,6 +2230,13 @@ def _extract_filesize(media_url):
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'))
Expand Down

0 comments on commit a6211d2

Please sign in to comment.