projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b16239
)
[youtube] Fix uploader id and uploader URL extraction
author
Sergey M․
<dstftw@gmail.com>
Mon, 15 Jun 2020 19:43:09 +0000
(
02:43
+0700)
committer
Sergey M․
<dstftw@gmail.com>
Mon, 15 Jun 2020 19:43:09 +0000
(
02:43
+0700)
youtube_dl/extractor/youtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/youtube.py
b/youtube_dl/extractor/youtube.py
index aaa4023b478e561027c98aa90d295971507ca385..ce2212a7caa13111e1d2835fa65be371a4937847 100644
(file)
--- 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'))