X-Git-Url: https://git.rapsys.eu/youtubedl/blobdiff_plain/e76f531201cd41dfc0ce00be28bcc5c575c7acc5..f19349c26118065acbe21509383c63465df794fe:/youtube_dl/extractor/moniker.py diff --git a/youtube_dl/extractor/moniker.py b/youtube_dl/extractor/moniker.py index 7c0c4e5..f6bf94f 100644 --- a/youtube_dl/extractor/moniker.py +++ b/youtube_dl/extractor/moniker.py @@ -5,13 +5,11 @@ import os.path import re from .common import InfoExtractor -from ..compat import ( - compat_urllib_parse, - compat_urllib_request, -) +from ..compat import compat_urllib_parse from ..utils import ( ExtractorError, remove_start, + sanitized_Request, ) @@ -81,7 +79,7 @@ class MonikerIE(InfoExtractor): orig_webpage, 'builtin URL', default=None, group='url') if builtin_url: - req = compat_urllib_request.Request(builtin_url) + req = sanitized_Request(builtin_url) req.add_header('Referer', url) webpage = self._download_webpage(req, video_id, 'Downloading builtin page') title = self._og_search_title(orig_webpage).strip() @@ -94,7 +92,7 @@ class MonikerIE(InfoExtractor): headers = { b'Content-Type': b'application/x-www-form-urlencoded', } - req = compat_urllib_request.Request(url, post, headers) + req = sanitized_Request(url, post, headers) webpage = self._download_webpage( req, video_id, note='Downloading video page ...')