diff options
Diffstat (limited to 'youtube_dl/extractor/dcn.py')
-rw-r--r-- | youtube_dl/extractor/dcn.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/youtube_dl/extractor/dcn.py b/youtube_dl/extractor/dcn.py index d9485cd86..0d140f12f 100644 --- a/youtube_dl/extractor/dcn.py +++ b/youtube_dl/extractor/dcn.py @@ -5,13 +5,11 @@ import re import base64 from .common import InfoExtractor -from ..compat import ( - compat_urllib_parse, - compat_urllib_request, -) +from ..compat import compat_urllib_parse from ..utils import ( int_or_none, parse_iso8601, + sanitized_Request, smuggle_url, unsmuggle_url, ) @@ -99,7 +97,7 @@ class DCNVideoIE(DCNBaseIE): def _real_extract(self, url): video_id = self._match_id(url) - request = compat_urllib_request.Request( + request = sanitized_Request( 'http://admin.mangomolo.com/analytics/index.php/plus/video?id=%s' % video_id, headers={'Origin': 'http://www.dcndigital.ae'}) video_data = self._download_json(request, video_id) @@ -125,7 +123,7 @@ class DCNLiveIE(DCNBaseIE): def _real_extract(self, url): channel_id = self._match_id(url) - request = compat_urllib_request.Request( + request = sanitized_Request( 'http://admin.mangomolo.com/analytics/index.php/plus/getchanneldetails?channel_id=%s' % channel_id, headers={'Origin': 'http://www.dcndigital.ae'}) @@ -167,13 +165,13 @@ class DCNSeasonIE(InfoExtractor): data['season'] = season_id show_id = smuggled_data.get('show_id') if show_id is None: - request = compat_urllib_request.Request( + request = sanitized_Request( 'http://admin.mangomolo.com/analytics/index.php/plus/season_info?id=%s' % season_id, headers={'Origin': 'http://www.dcndigital.ae'}) season = self._download_json(request, season_id) show_id = season['id'] data['show_id'] = show_id - request = compat_urllib_request.Request( + request = sanitized_Request( 'http://admin.mangomolo.com/analytics/index.php/plus/show', compat_urllib_parse.urlencode(data), { |