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. log4j详解与实战

    [转自] http://www.iteye.com/topic/378077 log4j是一个非常强大的log记录软件,下面我们就来看看在项目中如何使log4j. 首先当然是得到log4j的jar档, ...

  2. RedisClient 连接redis 提示 ERR Client sent AUTH, but no password is set

  3. Caused by java.lang.IllegalStateException Not allowed to start service Intent { cmp=com.x.x.x/.x.x.xService }: app is in background uid UidRecord(一)

    Caused by java.lang.IllegalStateException Not allowed to start service Intent { cmp=com.x.x.x/.x.x.x ...

  4. js、css的阻塞问题

    js.css的阻塞问题 这篇文章主要是探索js.css的加载顺序及其影响问题. 下面的代码可以让浏览器阻塞: <!DOCTYPE html> <html lang="en& ...

  5. flutter initializing gradle终极解决方案

    自己开发的公众号,可以领取淘宝内部优惠券 修改flutter.gradle文件 这种做法网上一大堆的教程,如果你还没改过建议先试下,比如这篇 Flutter 运行 一直Initializing gra ...

  6. HttpServletRequest的获取客户端真实IP

    摘自:http://chenyoulu.diandian.com/post/2012-11-14/40042540378 request方法客户端IP: request.getRemoteAddr() ...

  7. JavaScript获取url参数

    声明:以下内容转自网络 方法一 String.prototype.getUrlString = function(name) { var reg = new RegExp("(^|& ...

  8. c#学习基础(2)存储、值类型和引用类型、变量

    程序运行时,它的数据必须存储在内存中,数据项需要多大的内存.存储在什么地方以及如何存储都依赖该数据项的类型 运行中的程序使用两个区域来存储数据:栈和堆 栈是一个内存数组,是一个LIFO(last in ...

  9. javascript学习:闭包和prototype原型使用基础

    闭包 function Person(name) { this.Username = name; var Userage = 18; //通过这种方法可以模拟私有成员 //类似于private成员 t ...

  10. 05.File类的学习

    File  是文件的意思 File类是一个静态类,所以File类是一个工具类 File类是专门操作文件的类 File的常用方法 namespace _16.File类的学习 { class Progr ...