from selenium import webdriver

url = "https://www.baidu.com"
dr = webdriver.Ie()
dr.get(url)
print('all cookies : ',dr.get_cookies())
dr.quit()

报错信息:

说明是驱动问题, 驱动和浏览器不匹配,且提示不要用64位ie驱动ie10or11,即使是在64位的电脑上。

我安装的是64位的驱动。换成32位的ie驱动问题消除。

IE驱动包下载地址:

https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver

http://selenium-release.storage.googleapis.com/index.html  选择selenium版本对应的驱动下载

查看selenium版本: pip show selenium

selenium:IE浏览器获取cookie提示Could not retrieve cookies的更多相关文章

  1. Selenium WebDriver- 操作浏览器的cookie

    #encoding=utf-8 import unittest import time from selenium import webdriver from selenium.webdriver i ...

  2. 测试框架httpclent 3.获取cookie的信息,然后带cookies去发送请求

    在properties文件里面: startupWithCookies.json [ { "description":"这是一个会返回cookies信息的get请求&qu ...

  3. 浏览器查看cookie

    今天总结下,教你怎样查看一些浏览器的Cookie,比如IE.Firefox.Chrome的Cookies等.下面分块介绍,以后会关注一些没有讲到的浏览器获取Cookie的方法. 1.Firefox浏览 ...

  4. selenium模拟浏览器对搜狗微信文章进行爬取

    在上一篇博客中使用redis所维护的代理池抓取微信文章,开始运行良好,之后运行时总是会报501错误,我用浏览器打开网页又能正常打开,调试了好多次都还是会出错,既然这种方法出错,那就用selenium模 ...

  5. python利用selenium(webdriver chrome)模拟登陆获取cookie

    (我是在windows下进行实验的) 准备工作: 1.安装python环境. 2.python安装selenium插件(执行以下命令就行).   pip install selenium 3.Wind ...

  6. 【接口自动化】selenium库也有大用场(获取cookie)

    相信有些童鞋在做接口.或者说接口自动化测试的过程中会遇到这样的场景:测试的接口,必须是需要登录后才能发起请求成功的. 那么怎么解决呢? 本着团队协作的精神,我们就去让开发同学开个后门,给你个" ...

  7. 使用Selenium+ChromeDriver登录微博并且获取cookie

    using OpenQA.Selenium;using OpenQA.Selenium.Chrome; public class GetSinaCookie { private static stri ...

  8. js如何在浏览器添加cookie(添加、获取、删除)

    首先,简单用js将cookie保存到浏览器中,具体可按F12在这里查看(火狐浏览器) 1.js脚本方法 1)添加cookie方法 //添加cookie var addCookie = function ...

  9. selenium获取cookie

    参考地址:https://www.cnblogs.com/lingwang3/p/7750156.html # 获取cookie import time from selenium import we ...

随机推荐

  1. win7和centos7双系统--转

    转自http://blog.chinaunix.net/uid-30867756-id-5758575.html 参考:http://blog.csdn.net/hsg77/article/detai ...

  2. PHP房贷计算器代码,等额本息,等额本金

    debx(); function debx() { $dkm = 240; //贷款月数,20年就是240个月 $dkTotal = 10000; //贷款总额 $dknl = 0.0515; //贷 ...

  3. DataX 安装和使用

    阿里云介绍: 1. 下载安装包.作为阿里主要的数据传输工具Datax,阿里已经完全开源到github上面了.下载地址(https://github.com/alibaba/DataX). 2. 安装环 ...

  4. Unity 判断Animatior是否播放完

    public Animator animator; void Start() { animator = this.GetComponent<Animator>(); } void Upda ...

  5. [转]how to use both JDK 7 and JDK 8 in one build

    Note: This article is original from https://gist.github.com/aslakknutsen/9648594 JDK 8 Released Most ...

  6. HDU 1800——Flying to the Mars——————【字符串哈希】

    Flying to the Mars Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Other ...

  7. 测试UTC时间可以用的网址

    需要FQ的网址 https://time.artjoey.com/cn/ 不需要FQ的网址 https://time.is/ http://time.123cha.com/?q=Minsk

  8. HTTP和HTTPS的区别?

    HTTP1.1(Hypertext Transfer Protocol Vertion 1.1)超文本传输协议-版本1.1它是用来在Internet上传送超文本的传送协议.它是运行在Tcp/Ip协议族 ...

  9. JavaScript对象 继承

    JavaScript继承主要依靠原型链实现. 原型链 利用原型让一个引用类型继承另一个引用类型水位属性和方法. 每一个构造函数都有一个原型对象,原型对象都包含一个指向构造函数的指针,而实例都包含一个指 ...

  10. Java 匿名内部类 & 内部类

    一.JAVA中内部类和匿名内部类的区别 内部类:内部类可以是static的或者非static的,static内部类只能包含静态方法和静态类变量,只能访问外部类的静态元素,内部类可以实例化,多次使用. ...