]> jfr.im git - yt-dlp.git/commitdiff
[cbs] Make failure to extract title non-fatal
authorpukkandan <redacted>
Sat, 23 Jan 2021 02:00:08 +0000 (07:30 +0530)
committerpukkandan <redacted>
Sat, 23 Jan 2021 03:21:57 +0000 (08:51 +0530)
:skip ci

youtube_dlc/extractor/cbs.py

index 4a19a73d2fe70f6252960102e8b65f9c9d610e8a..d00053685c305ca0e38f5fe7fcf5abaaa794d005 100644 (file)
@@ -59,7 +59,7 @@ def _extract_video_info(self, content_id, site='cbs', mpx_acc=2198311517):
             'http://can.cbs.com/thunder/player/videoPlayerService.php',
             content_id, query={'partner': site, 'contentId': content_id})
         video_data = xpath_element(items_data, './/item')
-        title = xpath_text(video_data, 'videoTitle', 'title', True)
+        title = xpath_text(video_data, 'videoTitle', 'title') or xpath_text(video_data, 'videotitle', 'title')
         tp_path = 'dJ5BDC/media/guid/%d/%s' % (mpx_acc, content_id)
         tp_release_url = 'http://link.theplatform.com/s/' + tp_path