mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-06 10:59:36 +02:00
replace urlencode.encode with urlencode_postdata
This commit is contained in:
parent
c33de004e1
commit
5c97ec5ff5
@ -8,11 +8,11 @@
|
||||
import re
|
||||
|
||||
from ..compat import (
|
||||
compat_urllib_parse_urlencode,
|
||||
compat_urlparse,
|
||||
)
|
||||
from ..utils import (
|
||||
js_to_json,
|
||||
urlencode_postdata,
|
||||
)
|
||||
|
||||
|
||||
@ -44,10 +44,10 @@ def _real_extract(self, url):
|
||||
"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")
|
||||
|
Loading…
Reference in New Issue
Block a user