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

按照教程中的方式获取的cookies,是否会过期 #70

Closed
chaoxu1203 opened this issue Jun 30, 2022 · 6 comments
Closed

按照教程中的方式获取的cookies,是否会过期 #70

chaoxu1203 opened this issue Jun 30, 2022 · 6 comments

Comments

@chaoxu1203
Copy link

你好,我按照教程中提供的方法1获取了cookies,目前可以使用,这个cookies会过期吗?是否有有效期?

使用的教程:#62

@longxiaofei
Copy link
Owner

应该有有效期,我也不清楚多久会过期。

我自己跑了一次两天的脚本,没有因为cookies过期而中断。

如果获取过多关键词的指数,建议自己做好容错。

@chaoxu1203
Copy link
Author

应该有有效期,我也不清楚多久会过期。

我自己跑了一次两天的脚本,没有因为cookies过期而中断。

如果获取过多关键词的指数,建议自己做好容错。

有方法可以通过代码自动获取cookies吗?想做一个线上长期跑的系统,定时获取数据,不想人工干预。

@longxiaofei
Copy link
Owner

这个项目最初是给学生写论文时需要用到百度指数时做的,所以不涉及到long running的需求。

同时模拟百度登录使用二维码的方式,也是为了防止有人为了做工程化直接拿来用。

你可以找到一个"使用账号密码模拟登录百度"的项目,基于这么一个项目去维护一个自己的cookie池。

@chaoxu1203
Copy link
Author

这个项目最初是给学生写论文时需要用到百度指数时做的,所以不涉及到long running的需求。

同时模拟百度登录使用二维码的方式,也是为了防止有人为了做工程化直接拿来用。

你可以找到一个"使用账号密码模拟登录百度"的项目,基于这么一个项目去维护一个自己的cookie池。

可以麻烦贴一下这个项目的地址吗?没有搜索到:)

@longxiaofei
Copy link
Owner

可以自己搜索一下,如果实在找不到的话,可以尝试自己写一下。

@chaoxu1203
Copy link
Author

好的,感谢!

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

No branches or pull requests

2 participants