mirror of
https://github.com/blackjack4494/yt-dlc.git
synced 2024-12-23 00:07:49 +00:00
replace urlencode.encode with urlencode_postdata
This commit is contained in:
parent
c33de004e1
commit
5c97ec5ff5
1 changed files with 3 additions and 3 deletions
|
@ -8,11 +8,11 @@ import random
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from ..compat import (
|
from ..compat import (
|
||||||
compat_urllib_parse_urlencode,
|
|
||||||
compat_urlparse,
|
compat_urlparse,
|
||||||
)
|
)
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
js_to_json,
|
js_to_json,
|
||||||
|
urlencode_postdata,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,10 +44,10 @@ class WeiboIE(InfoExtractor):
|
||||||
"screenInfo": "1440*900*24",
|
"screenInfo": "1440*900*24",
|
||||||
"plugins": ""
|
"plugins": ""
|
||||||
}
|
}
|
||||||
data = compat_urllib_parse_urlencode({
|
data = urlencode_postdata({
|
||||||
"cb": "gen_callback",
|
"cb": "gen_callback",
|
||||||
"fp": json.dumps(fp),
|
"fp": json.dumps(fp),
|
||||||
}).encode()
|
})
|
||||||
|
|
||||||
genvisitor_url = 'https://passport.weibo.com/visitor/genvisitor'
|
genvisitor_url = 'https://passport.weibo.com/visitor/genvisitor'
|
||||||
webpage, _ = self._download_webpage_handle(genvisitor_url, video_id, data=data, headers=headers, note="gen visitor")
|
webpage, _ = self._download_webpage_handle(genvisitor_url, video_id, data=data, headers=headers, note="gen visitor")
|
||||||
|
|
Loading…
Reference in a new issue