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

能来个网页版今日头条的不😄 #11

Open
luciferwoo opened this issue Oct 9, 2017 · 8 comments
Open

能来个网页版今日头条的不😄 #11

luciferwoo opened this issue Oct 9, 2017 · 8 comments

Comments

@luciferwoo
Copy link

想自动登录发布爬来的东西,但是自动登录搞不定,拜谢

@ResolveWang
Copy link
Member

你通过selenium模拟浏览器能搞定吗?能的话就用自动化的方法吧。把登录后获取的cookie保存下来就行了。因为目前精力有限,可能下一次更新要等大概春节了。

@ResolveWang
Copy link
Member

如果selenium搞不定,我去看看吧,能搞定当然更好了:)

@luciferwoo
Copy link
Author

昨天晚上研究了一下,还没有测试,登录应该没有问题.
现在有个新的问题请教下,当我点击上传文件的时候,浏览器弹出的选择文件的窗口,是系统的窗口,不是网页的,这个要怎么解决,给指条路,大概解释下就可以了,多谢😁

@ResolveWang
Copy link
Member

你是说的selenium吗?我没有试过,不知道这篇博客的方法是否可行。如果直接是用requests的话,我的思路就是直接抓包,然后看看提交的数据,再使用requests模拟

@luciferwoo
Copy link
Author

刚才试了一下,真的可以😆多谢多谢

@ResolveWang
Copy link
Member

客气了

@luciferwoo
Copy link
Author

不好意思,又要打扰了

  1. 我登陆成功,并且获取到了cookie
  2. get 登录地址
  3. add_cookie 添加 cookie
  4. get 登陆后的首页

但是登录一直不成功,提示:
"error":"session notcreated","message":"Tried to run command without establishing a connection"
这个是什么原因呢
多谢

@ResolveWang
Copy link
Member

你不是登录成功了吗?最后怎么又是登录不成功。我不理解你的意思。
最好能贴详细信息和示意图,否则我也无法判断什么原因。

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