aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxarantolus <xarantolus@protonmail.com>2020-08-24 14:30:08 +0200
committerxarantolus <xarantolus@protonmail.com>2020-09-06 09:22:48 +0200
commitf442082a50f94fc3c36db954764b70d6a08beaa1 (patch)
tree66312a7a2323852f59df5010b9720e35b31a80f6
parent1f93faf60bb1447ff1aa661e46916e863640ade2 (diff)
downloadhypervideo-pre-f442082a50f94fc3c36db954764b70d6a08beaa1.tar.lz
hypervideo-pre-f442082a50f94fc3c36db954764b70d6a08beaa1.tar.xz
hypervideo-pre-f442082a50f94fc3c36db954764b70d6a08beaa1.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.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index ec821cbc0..c8d80bbd2 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -3383,7 +3383,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