[extractor] Improve json+ld extraction

Related #5035
This commit is contained in:
pukkandan
2022-09-27 02:30:50 +05:30
parent 1534aba865
commit 0f60ba6e65
3 changed files with 11 additions and 4 deletions

View File

@@ -2910,7 +2910,7 @@ class GenericIE(InfoExtractor):
if json_ld.get('url') not in (url, None):
self.report_detected('JSON LD')
return merge_dicts({
'_type': 'url_transparent',
'_type': 'video' if json_ld.get('ext') else 'url_transparent',
'url': smuggle_url(json_ld['url'], {
'force_videoid': video_id,
'to_generic': True,