Comments (5)
Cookies 是HttpOnly 的 ,设置无效 ,但是使用selenium 设置,然后刷新页面 就有效
谢谢反馈,可以告诉我是哪个网站吗?
from drissionpage.
from drissionpage.
找到原因了,不是HttpOnly的原因,是selenium add_cookie()时自动在domain前加了一个'.',导致未能覆盖浏览器新产生的cookie,如果set_cookies()前先delete_cookie('sid'),就能正常登录。
我想想解决办法。
可以给你设置有效的selenium代码我看看吗?可以加QQ详谈吗?178691442。谢谢。
from drissionpage.
临时解决办法:
cookies = ({'sid': 'xxxxxxx'}, ....)
page.get('https://xiumi.us')
page.driver.delete_cookie('sid') # 加上这句
page.set_cookies(cookies)
这个cookie二级域名前没有'.',而selenium添加cookie时会自动加'.',所以不能正确覆盖。
下个版本对这种情况做适配,目前可以先手动删除这个cookie,这样写也不会影响新版本的兼容性
from drissionpage.
Cookies 是HttpOnly 的 ,设置无效 ,但是使用selenium 设置,然后刷新页面 就有效
v1.7.8已修复这个问题,请试一下
from drissionpage.
Related Issues (18)
- ChromiumPage 浏览器启动后报错websocket._exceptions.WebSocketBadStatusException: Handshake status 403 Forbidden HOT 5
- 监听问题
- text()和raw_text()方法在textarea区域的问题。
- 标签页加载失败陷入死循环/等待过久 HOT 7
- 考虑支持go语言吗 HOT 1
- 如何实现ctrl+F的功能 HOT 4
- 请问是怎么做到这么真实的 HOT 3
- websocket._exceptions.WebSocketBadStatusException: Handshake status 403 Forbidden HOT 1
- 抓包请求的时候 发现请求头里面没有Cookie HOT 2
- 无法适应mac系统的调试 HOT 4
- 启动浏览器失败 HOT 1
- 这个包可以实现爬取搜索引擎结果吗 HOT 1
- 想知道作者使用了那些黑科技可以减少指纹的暴露,防止网页探测为bot HOT 1
- 启动浏览器失败 HOT 10
- 请问是否可实现拦截发送前的request和渲染前的response HOT 4
- 请问怎么导入 本地的cookie文件,类似于selenium的add_cookie() 谢谢 HOT 1
- 安装时报错:Could not find a version that satisfies the requirement click~=8.1.3 (from DrissionPage) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drissionpage.