Skip to content

Commit

Permalink
fix: sign error, resolved ##53
Browse files Browse the repository at this point in the history
  • Loading branch information
ReaJason committed Sep 20, 2023
1 parent 0abfa34 commit cc5dfc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example/basic_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def sign(uri, data=None, a1="", web_session=""):
browser_context.add_cookies([
{'name': 'a1', 'value': a1, 'domain': ".xiaohongshu.com", 'path': "/"}]
)

context_page.reload()
# 这个地方设置完浏览器 cookie 之后,如果这儿不 sleep 一下签名获取就失败了,如果经常失败请设置长一点试试
sleep(1)
encrypt_params = context_page.evaluate("([url, data]) => window._webmsxyw(url, data)", [uri, data])
Expand Down

0 comments on commit cc5dfc0

Please sign in to comment.