0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-26 02:55:17 +00:00

[cbsinteractive] Fix extraction for cnet.com

This commit is contained in:
Yen Chi Hsuan 2016-10-14 18:20:01 +08:00
parent 580d411931
commit a5f8473145
No known key found for this signature in database
GPG key ID: 3FDDD575826C5C30
2 changed files with 2 additions and 1 deletions

View file

@ -1,6 +1,7 @@
version <unreleased> version <unreleased>
Extractors Extractors
* [cbsinteractive] Fix extraction for cnet.com
* [parliamentliveuk] Lower case URLs are now recognized (#10912) * [parliamentliveuk] Lower case URLs are now recognized (#10912)

View file

@ -63,7 +63,7 @@ def _real_extract(self, url):
webpage = self._download_webpage(url, display_id) webpage = self._download_webpage(url, display_id)
data_json = self._html_search_regex( data_json = self._html_search_regex(
r"data-(?:cnet|zdnet)-video(?:-uvp)?-options='([^']+)'", r"data-(?:cnet|zdnet)-video(?:-uvp(?:js)?)?-options='([^']+)'",
webpage, 'data json') webpage, 'data json')
data = self._parse_json(data_json, display_id) data = self._parse_json(data_json, display_id)
vdata = data.get('video') or data['videos'][0] vdata = data.get('video') or data['videos'][0]