[rumble] unescape title

This commit is contained in:
pukkandan 2022-03-17 01:37:04 +05:30
parent a1b2d84360
commit 4e34889f1c
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39

View file

@ -11,6 +11,7 @@
int_or_none, int_or_none,
parse_iso8601, parse_iso8601,
try_get, try_get,
unescapeHTML,
ExtractorError, ExtractorError,
) )
@ -27,6 +28,20 @@ class RumbleEmbedIE(InfoExtractor):
'timestamp': 1571611968, 'timestamp': 1571611968,
'upload_date': '20191020', 'upload_date': '20191020',
} }
}, {
'url': 'https://rumble.com/embed/vslb7v',
'md5': '7418035de1a30a178b8af34dc2b6a52b',
'info_dict': {
'id': 'vslb7v',
'ext': 'mp4',
'title': 'Defense Sec. says US Commitment to NATO Defense \'Ironclad\'',
'timestamp': 1645142135,
'upload_date': '20220217',
'channel_url': 'https://rumble.com/c/CyberTechNews',
'channel': 'CTNews',
'thumbnail': 'https://sp.rmbl.ws/s8/6/7/i/9/h/7i9hd.OvCc.jpg',
'duration': 901,
}
}, { }, {
'url': 'https://rumble.com/embed/ufe9n.v5pv5f', 'url': 'https://rumble.com/embed/ufe9n.v5pv5f',
'only_matching': True, 'only_matching': True,
@ -45,7 +60,7 @@ def _real_extract(self, url):
video = self._download_json( video = self._download_json(
'https://rumble.com/embedJS/', video_id, 'https://rumble.com/embedJS/', video_id,
query={'request': 'video', 'v': video_id}) query={'request': 'video', 'v': video_id})
title = video['title'] title = unescapeHTML(video['title'])
formats = [] formats = []
for height, ua in (video.get('ua') or {}).items(): for height, ua in (video.get('ua') or {}).items():