diff options
author | sprhawk <465558+sprhawk@users.noreply.github.com> | 2017-12-30 01:08:56 +0800 |
---|---|---|
committer | sprhawk <465558+sprhawk@users.noreply.github.com> | 2017-12-30 01:08:56 +0800 |
commit | 5c97ec5ff5fd77a7975e1e946d53a76ccd5ef0de (patch) | |
tree | 509c23e254cba5d9c71550b8d722a677aebac7fe | |
parent | c33de004e13da11f1ae3cad7310b36500cfb9d28 (diff) | |
download | youtube-dl-5c97ec5ff5fd77a7975e1e946d53a76ccd5ef0de.zip youtube-dl-5c97ec5ff5fd77a7975e1e946d53a76ccd5ef0de.tar.gz youtube-dl-5c97ec5ff5fd77a7975e1e946d53a76ccd5ef0de.tar.bz2 |
replace urlencode.encode with urlencode_postdata
-rw-r--r-- | youtube_dl/extractor/weibo.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/youtube_dl/extractor/weibo.py b/youtube_dl/extractor/weibo.py index 2be31fe..0b28952 100644 --- a/youtube_dl/extractor/weibo.py +++ b/youtube_dl/extractor/weibo.py @@ -8,11 +8,11 @@ import random import re from ..compat import ( - compat_urllib_parse_urlencode, compat_urlparse, ) from ..utils import ( js_to_json, + urlencode_postdata, ) @@ -44,10 +44,10 @@ class WeiboIE(InfoExtractor): "screenInfo": "1440*900*24", "plugins": "" } - data = compat_urllib_parse_urlencode({ + data = urlencode_postdata({ "cb": "gen_callback", "fp": json.dumps(fp), - }).encode() + }) genvisitor_url = 'https://passport.weibo.com/visitor/genvisitor' webpage, _ = self._download_webpage_handle(genvisitor_url, video_id, data=data, headers=headers, note="gen visitor") |