Unverified Commit a6211d23 authored by Sergey M․'s avatar Sergey M․
Browse files

[youtube] Fix uploader id and uploader URL extraction

parent 7b16239a
...@@ -2230,6 +2230,13 @@ class YoutubeIE(YoutubeBaseInfoExtractor): ...@@ -2230,6 +2230,13 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
if mobj is not None: if mobj is not None:
video_uploader_id = mobj.group('uploader_id') video_uploader_id = mobj.group('uploader_id')
video_uploader_url = mobj.group('uploader_url') 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 = ( channel_id = (
str_or_none(video_details.get('channelId')) str_or_none(video_details.get('channelId'))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment