自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 收藏
  • 关注

原创 Scrapy爬虫报错HTTP status code is not handled or not allowed

爬取网页显示403HTTP status code is not handled or not allowed解决方法:在settings.py里把代理关掉:DOWNLOADER_MIDDLEWARES = {'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware': None,}

2022-04-29 21:52:55 965

原创 python导出csv乱码问题解决

把编码方式改成如下示例:with open('xxx.csv','a',newline='',encoding='utf_8_sig') as csvfile:其他均不变之后生成的csv文件就不会乱码啦:)

2021-11-24 11:55:17 992

原创 selenium出现selenium.common.exceptions.ElementNotVisibleException: Message: element not interactable——

用selenium爬虫,出现如下报错:selenium.common.exceptions.ElementNotVisibleException: Message: element not interactable原因可能是网页来不及加载出所要调取的元素解决方案:在 driver.get('url')下面加上一行:time.sleep(3) (或者保守一些 5s)再次运行,不再出错...

2021-11-15 12:28:27 1057

原创 selenium调取webdriver出现‘dict‘ object has no attribute ‘has_key‘

当前版本:python3 + 最新的selenium + Chrome95.0.4638.69(stable)用selenium调取webdriver,接着driver.find_element_by_tag_name,提取出的不是WebElement,而是dict接下来出现:'dict' object has no attribute 'has_key''dict' object has no attribute 'text'尝试下载最新的chromedriver,无效手动

2021-11-13 19:48:38 719 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除