diff options
| author | remitamine <remitamine@gmail.com> | 2015-12-03 20:33:22 +0100 | 
|---|---|---|
| committer | remitamine <remitamine@gmail.com> | 2015-12-03 20:33:22 +0100 | 
| commit | 78653a33aa00ba5205940c2baac5d9f019795b88 (patch) | |
| tree | 246fd038effd402bc66de4c8afb36e6c318efcaa /youtube_dl/extractor/cbs.py | |
| parent | 77302fe5c989b9cafcb675c0a03642b80fa557ff (diff) | |
| parent | 24dc1ed715239f85eb3d5f71a707da1dd2bc7773 (diff) | |
Merge remote-tracking branch 'upstream/master' into bliptv
Diffstat (limited to 'youtube_dl/extractor/cbs.py')
| -rw-r--r-- | youtube_dl/extractor/cbs.py | 14 | 
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,          } | 
