aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/twitter.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dl/extractor/twitter.py')
-rw-r--r--youtube_dl/extractor/twitter.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/extractor/twitter.py b/youtube_dl/extractor/twitter.py
index 055047340..a161f046b 100644
--- a/youtube_dl/extractor/twitter.py
+++ b/youtube_dl/extractor/twitter.py
@@ -4,13 +4,13 @@ from __future__ import unicode_literals
import re
from .common import InfoExtractor
-from ..compat import compat_urllib_request
from ..utils import (
float_or_none,
xpath_text,
remove_end,
int_or_none,
ExtractorError,
+ sanitized_Request,
)
@@ -81,7 +81,7 @@ class TwitterCardIE(InfoExtractor):
config = None
formats = []
for user_agent in USER_AGENTS:
- request = compat_urllib_request.Request(url)
+ request = sanitized_Request(url)
request.add_header('User-Agent', user_agent)
webpage = self._download_webpage(request, video_id)