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/nfb.py | |
parent | 77302fe5c989b9cafcb675c0a03642b80fa557ff (diff) | |
parent | 24dc1ed715239f85eb3d5f71a707da1dd2bc7773 (diff) |
Merge remote-tracking branch 'upstream/master' into bliptv
Diffstat (limited to 'youtube_dl/extractor/nfb.py')
-rw-r--r-- | youtube_dl/extractor/nfb.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/youtube_dl/extractor/nfb.py b/youtube_dl/extractor/nfb.py index ea077254b..5bd15f7a7 100644 --- a/youtube_dl/extractor/nfb.py +++ b/youtube_dl/extractor/nfb.py @@ -1,10 +1,8 @@ from __future__ import unicode_literals from .common import InfoExtractor -from ..compat import ( - compat_urllib_request, - compat_urllib_parse, -) +from ..compat import compat_urllib_parse +from ..utils import sanitized_Request class NFBIE(InfoExtractor): @@ -40,8 +38,9 @@ class NFBIE(InfoExtractor): uploader = self._html_search_regex(r'<em class="director-name" itemprop="name">([^<]+)</em>', page, 'director name', fatal=False) - request = compat_urllib_request.Request('https://www.nfb.ca/film/%s/player_config' % video_id, - compat_urllib_parse.urlencode({'getConfig': 'true'}).encode('ascii')) + request = sanitized_Request( + 'https://www.nfb.ca/film/%s/player_config' % video_id, + compat_urllib_parse.urlencode({'getConfig': 'true'}).encode('ascii')) request.add_header('Content-Type', 'application/x-www-form-urlencoded') request.add_header('X-NFB-Referer', 'http://www.nfb.ca/medias/flash/NFBVideoPlayer.swf') |