报错:

FakeUserAgentError('Maximum amount of retries reached')

禁用服务器缓存:

ua = UserAgent(use_cache_server=False)
无效
不缓存数据:
ua = UserAgent(cache=False)
无效
忽略ssl验证:
ua = UserAgent(verify_ssl=False)
无效

解决办法:

下载: https://fake-useragent.herokuapp.com/browsers/0.1.11 并另存为:fake_useragent.json
def get_header():
location = os.getcwd() + '/fake_useragent.json'
ua = fake_useragent.UserAgent(path=location)
return ua.random

FakeUserAgentError('Maximum amount of retries reached') 彻底解决办法的更多相关文章

  1. fake_useragent.errors.FakeUserAgentError: Maximum amount of retries reached解决方法!

    UserAgent 就是用户代理,又叫报头,是一串字符串,相当于浏览器的身份证号,在利用爬虫爬取网站数据时,频繁更换它可以避免触发相应的反爬机制. fake-useragent对频繁更换UserAge ...

  2. 【python 爬虫】fake-useragent Maximum amount of retries reached解决方案

    前言 在用fake-useragent的时候发生报错,fake_useragent.errors.FakeUserAgentError: Maximum amount of retries reach ...

  3. Oracle 错误 maximum number of processes(150) exceeded 解决办法

    网上很多同行应该都遇到过这个问题,百度一搜 千篇一律的处理办法,就是加大进程数. 但是我这边情况不一样,因为我的Oracle 11g是早上刚装的,跟本没人用,我用PLSQL链接照样说不能链接. 我就在 ...

  4. Exceeded maximum number of retries. Exceeded max scheduling attempts 3 for instance

    Exceeded maximum number of retries. Exceeded max scheduling attempts 3 for instance

  5. Exceeded maximum number of retries. Exceeded max scheduling attempts 3 for instance 7d90eb80-29e2-4238-b658-ade407ff9456. Last exception: [u'Traceback (most recent call last):\n', u' File "/usr/lib/py

    Exceeded maximum number of retries. Exceeded max scheduling attempts 3 for instance 7d90eb80-29e2-42 ...

  6. Not saving crash log because we have reached the limit for logs to store on disk.解决办法

    一.问题简述: Xcode, window>Devices>DEVICES选中自已的设备,打开控制台:提示日志存量已达限制,这个是系统抛出的log."Not saving cra ...

  7. 关于python3.6上传文件时报错:HTTPSConnectionPool(host='***.org', port=443): Max retries exceeded with url: /post (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAIL解决办法

    第一个报错: 最近在练习post请求中上传文件时遇到了一个奇葩事情,两台电脑上写了一模一样的代码,一个运行正常,另一个一片红. 最后了解了一下原因以及解决办法.先记录下关键代码: files = {& ...

  8. CentOS使用systemctl daemon-reload报错Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)解决办法

    CentOS修改了系统启动文件后需要重载报错 systemctl daemon-reload Error getting authority: Error initializing authority ...

  9. passwd: Have exhausted maximum number of retries for service【转】

    使用命令passwd修改密码时,遇到如下问题: # echo 'utf8'|passwd zhangsan --stdin Changing password for user zhangsan. p ...

随机推荐

  1. FATAL ERROR: please install the following Perl modules before executing ./mysql_install_db: Data::Dumper

    今天安装本地数据库,所遇到的错误 FATAL ERROR: please install the following Perl modules before executing ./mysql_ins ...

  2. outlook邮件中样式问题

    目前要做一个定时发送邮件的功能,邮件的大致内容布局如下: HTML中 在QQ邮件中,可以进行正常显示. 在outlook网页版,也可以正常显示, outlook客户端 但是到了客户端就会出现很多很神奇 ...

  3. Codeforces 980F Cactus to Tree 仙人掌 Tarjan 树形dp 单调队列

    原文链接https://www.cnblogs.com/zhouzhendong/p/CF980F.html 题目传送门 - CF980F 题意 给定一个 $n$ 个节点 $m$ 条长为 $1$ 的边 ...

  4. Python中type和object

    type  所有类是type生成的 a = 1 b = "abc" print("type a:{}".format(type(a))) print(" ...

  5. day19 正则,re模块

    http://www.cnblogs.com/Eva-J/articles/7228075.html  所有常用模块的用法 正则的规则: 在一个字符组里面枚举合法的所有字符,字符组里面的任意一个字符和 ...

  6. LINQ技术

    转载http://www.cnblogs.com/Dlonghow/p/1413830.html Linq (Language Integrated Query,语言集成查询),是微软公司提供的一项新 ...

  7. chrome刷新CSS

    改动CSS发现页面根本没有变化,再三查看确实是这一处CSS,那么可能的就是浏览器缓存了CSS而刷新无效了. chrome刷新CSS: 方法1:直接ctrl+F5,进行强制刷新页面,浏览器会重新加载所有 ...

  8. 浅析AngularJS自定义指令之嵌入(transclude)

    AngularJS自定义指令的嵌入功能与vue的插槽十分类似,都可以实现一些自定义内容展现.在开始之前先简单介绍下自定义指令的transclude属性和AngularJS的内置指令ng-transcl ...

  9. python request 库

    快速上手 迫不及待了吗?本页内容为如何入门Requests提供了很好的指引.其假设你已经安装了Requests.如果还没有, 去 安装 一节看看吧. 首先,确认一下: Requests 已安装 Req ...

  10. 《重回耶路撒冷——犹太人的三千年》(Return to Jerusalem)读后感

    写在前面 书名:<重回耶路撒冷——犹太人的三千年>(Return to Jerusalem) 作者:张力升 来源:长清图书馆 阅读用时:其实年前拿到书,本来想寒假在家看的,但是在家一点儿都 ...