mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 09:07:58 +01:00
[cnet] Fix title extraction
URLs are still missing
This commit is contained in:
parent
264a7044f5
commit
6f5342a201
1 changed files with 5 additions and 1 deletions
|
@ -43,7 +43,11 @@ def _real_extract(self, url):
|
||||||
raise ExtractorError('Cannot find video data')
|
raise ExtractorError('Cannot find video data')
|
||||||
|
|
||||||
video_id = vdata['id']
|
video_id = vdata['id']
|
||||||
title = vdata['headline']
|
title = vdata.get('headline')
|
||||||
|
if title is None:
|
||||||
|
title = vdata.get('title')
|
||||||
|
if title is None:
|
||||||
|
raise ExtractorError('Cannot find title!')
|
||||||
description = vdata.get('dek')
|
description = vdata.get('dek')
|
||||||
thumbnail = vdata.get('image', {}).get('path')
|
thumbnail = vdata.get('image', {}).get('path')
|
||||||
author = vdata.get('author')
|
author = vdata.get('author')
|
||||||
|
|
Loading…
Reference in a new issue