aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/nowness.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dl/extractor/nowness.py')
-rw-r--r--youtube_dl/extractor/nowness.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/youtube_dl/extractor/nowness.py b/youtube_dl/extractor/nowness.py
index 0fba55833..d480fb58c 100644
--- a/youtube_dl/extractor/nowness.py
+++ b/youtube_dl/extractor/nowness.py
@@ -3,10 +3,10 @@ from __future__ import unicode_literals
from .brightcove import BrightcoveLegacyIE
from .common import InfoExtractor
-from ..utils import ExtractorError
-from ..compat import (
- compat_str,
- compat_urllib_request,
+from ..compat import compat_str
+from ..utils import (
+ ExtractorError,
+ sanitized_Request,
)
@@ -37,7 +37,7 @@ class NownessBaseIE(InfoExtractor):
def _api_request(self, url, request_path):
display_id = self._match_id(url)
- request = compat_urllib_request.Request(
+ request = sanitized_Request(
'http://api.nowness.com/api/' + request_path % display_id,
headers={
'X-Nowness-Language': 'zh-cn' if 'cn.nowness.com' in url else 'en-us',