Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问web端获取的cookie方式,我使用扫码登录后没有web_session字段 #52

Closed
tzxyz opened this issue Sep 18, 2023 · 3 comments
Labels
question Further information is requested

Comments

@tzxyz
Copy link

tzxyz commented Sep 18, 2023

我使用example目录下的basic_usage.py
登录小红书web版,获取cookie并复制到代码中
程序逻辑在core.py 129行self.activate处报错,检测后发现我得cookie没有web_session字段

    def cookie(self, cookie: str):
        update_session_cookies_from_cookie(self.__session, cookie)
        if "web_session" not in self.cookie_dict:
            self.activate()
@ReaJason
Copy link
Owner

不要在 console 中通过 document.cookie 获取,而是在 network 中复制请求中的 cookie

@tzxyz
Copy link
Author

tzxyz commented Sep 18, 2023

已解决,感谢解答

@tzxyz tzxyz closed this as completed Sep 18, 2023
@ReaJason ReaJason added the question Further information is requested label Sep 22, 2023
@CCCpan
Copy link

CCCpan commented Jun 11, 2024

除了network还有其他方法吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants