diff options
author | xarantolus <xarantolus@protonmail.com> | 2020-08-24 14:30:08 +0200 |
---|---|---|
committer | xarantolus <xarantolus@protonmail.com> | 2020-08-24 14:30:08 +0200 |
commit | 94255fa0b165d0646ae42e9b114f9dddaebc3123 (patch) | |
tree | 8f14eb81daeeec6b8c17fe1d2e1d4b0f3cc4851d | |
parent | 7d743516b541cf448bbaaa35ac95f8ecc8139432 (diff) | |
download | hypervideo-pre-94255fa0b165d0646ae42e9b114f9dddaebc3123.tar.lz hypervideo-pre-94255fa0b165d0646ae42e9b114f9dddaebc3123.tar.xz hypervideo-pre-94255fa0b165d0646ae42e9b114f9dddaebc3123.zip |
[youtube] More general title extraction
Seems like this attribute is moved every few weeks, so we just extract both and use the one that is present.
-rw-r--r-- | youtube_dl/extractor/youtube.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index ee8a4626d..8f622662a 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -3379,7 +3379,7 @@ class YoutubeFeedsInfoExtractor(YoutubeBaseInfoExtractor): info.extend(new_info) for video in new_info: - yield self.url_result(try_get(video, lambda x: x['videoId']), YoutubeIE.ie_key(), video_title=try_get(video, lambda x: x['title']['runs'][0]['text'])) + yield self.url_result(try_get(video, lambda x: x['videoId']), YoutubeIE.ie_key(), video_title=try_get(video, lambda x: x['title']['runs'][0]['text']) or try_get(video, lambda x: x['title']['simpleText'])) if not continuation or not yt_conf: break |