aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/cbs.py
diff options
context:
space:
mode:
authorremitamine <remitamine@gmail.com>2015-12-03 20:05:11 +0100
committerremitamine <remitamine@gmail.com>2015-12-03 20:05:11 +0100
commit640bb54e73779f4a941eae1f17e4be049ca575db (patch)
treeba0c50db3ad5bb0932a56cda66d4f386b145bb22 /youtube_dl/extractor/cbs.py
parent497f5fd93fe1efd0df8dc58d518c328ed1409457 (diff)
parente0977d7686e5df524b1a024484e7a4bb9cfa261d (diff)
downloadyoutube-dl-640bb54e73779f4a941eae1f17e4be049ca575db.tar.xz
Merge branch 'master' of https://github.com/rg3/youtube-dl into bilibili
Diffstat (limited to 'youtube_dl/extractor/cbs.py')
-rw-r--r--youtube_dl/extractor/cbs.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/youtube_dl/extractor/cbs.py b/youtube_dl/extractor/cbs.py
index 75fffb156..40d07ab18 100644
--- a/youtube_dl/extractor/cbs.py
+++ b/youtube_dl/extractor/cbs.py
@@ -1,6 +1,10 @@
from __future__ import unicode_literals
from .common import InfoExtractor
+from ..utils import (
+ sanitized_Request,
+ smuggle_url,
+)
class CBSIE(InfoExtractor):
@@ -46,13 +50,19 @@ class CBSIE(InfoExtractor):
def _real_extract(self, url):
display_id = self._match_id(url)
- webpage = self._download_webpage(url, display_id)
+ request = sanitized_Request(url)
+ # Android UA is served with higher quality (720p) streams (see
+ # https://github.com/rg3/youtube-dl/issues/7490)
+ request.add_header('User-Agent', 'Mozilla/5.0 (Linux; Android 4.4; Nexus 5)')
+ webpage = self._download_webpage(request, display_id)
real_id = self._search_regex(
[r"video\.settings\.pid\s*=\s*'([^']+)';", r"cbsplayer\.pid\s*=\s*'([^']+)';"],
webpage, 'real video ID')
return {
'_type': 'url_transparent',
'ie_key': 'ThePlatform',
- 'url': 'theplatform:%s' % real_id,
+ 'url': smuggle_url(
+ 'http://link.theplatform.com/s/dJ5BDC/%s?mbr=true&manifest=m3u' % real_id,
+ {'force_smil_url': True}),
'display_id': display_id,
}