![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
所遇到的坑
小儿小儿朗
这个作者很懒,什么都没留下…
展开
-
bs4 page_text中文出现乱码问题
对response拆开来写:对其进行编码成‘gbk’main_url = ‘https://www.du00.net/read/131/131890/index.html’response = requests.get(url = main_url,headers = headers)response.encoding = 'gbk'page_text = response.textfp = open(’./汉乡.txt’,‘w’,encoding=‘utf-8’)#数据解析soup =原创 2021-07-15 22:03:25 · 577 阅读 · 0 评论 -
No module named ‘protego‘
在使用scrapy框架时执行工程:scrapy crawl spiderName得到结果:No module named 'protego'在终端尝试该行代码:pip install scrapy --default-timeout=10000原创 2021-07-04 22:51:53 · 399 阅读 · 0 评论 -
ProxyError: Conda cannot proceed due to an error in your p roxy configuration. Check for typos and o
下载该模块时,出现以下问题:ProxyError: Conda cannot proceed due to an error in your proxy configuration.Check for typos and other configuration errors in any '.netrc' file in your home directory,any environment variables ending in '_PROXY', and any other system-w原创 2021-07-03 22:11:28 · 682 阅读 · 2 评论 -
selenium.common.exceptions.JavascriptException: Message: javascript error: windows is not defined 问题
执行代码:bro.execute_script('windows.scrollTo(0,document.body.scrollHeight)')sleep(2)执行结果:selenium.common.exceptions.JavascriptException: Message: javascript error: windows is not defined (Session info: chrome=91.0.4472.124)注意!!!windows 不要加s自动填充的时候注原创 2021-06-28 15:58:53 · 3085 阅读 · 1 评论 -
‘list‘ object has no attribute ‘click‘问题
执行该代码:执行结果:在输入find_element(s)_by_css_selector时要注意有没有多一个s!!!!!在填写时它会自动填充!!!注意注意!!!正确书写形式:原创 2021-06-28 15:53:43 · 588 阅读 · 0 评论