mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 14:45:14 +00:00 
			
		
		
		
	Use urlencode_postdata across the codebase
This commit is contained in:
		| @@ -1,8 +1,10 @@ | ||||
| from __future__ import unicode_literals | ||||
|  | ||||
| from .common import InfoExtractor | ||||
| from ..compat import compat_urllib_parse_urlencode | ||||
| from ..utils import sanitized_Request | ||||
| from ..utils import ( | ||||
|     sanitized_Request, | ||||
|     urlencode_postdata, | ||||
| ) | ||||
|  | ||||
|  | ||||
| class NFBIE(InfoExtractor): | ||||
| @@ -40,7 +42,7 @@ class NFBIE(InfoExtractor): | ||||
|  | ||||
|         request = sanitized_Request( | ||||
|             'https://www.nfb.ca/film/%s/player_config' % video_id, | ||||
|             compat_urllib_parse_urlencode({'getConfig': 'true'}).encode('ascii')) | ||||
|             urlencode_postdata({'getConfig': 'true'})) | ||||
|         request.add_header('Content-Type', 'application/x-www-form-urlencoded') | ||||
|         request.add_header('X-NFB-Referer', 'http://www.nfb.ca/medias/flash/NFBVideoPlayer.swf') | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Sergey M․
					Sergey M․