![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
大数据处理与分析
依神女苑
这个作者很懒,什么都没留下…
展开
-
爬虫框架Scrapy的安装(图文教程)
第1步安装lxml(这个最重要)pip3 install lxml第2步安装pyOpenSSL在官网下载wheel文件点此下载下载后进入该文件所在目录使用pip3 install pyOpenSSL-19.1.0-py2.py3-none-any.whl第3步安装Twisted在控制台下输入python查看你的电脑版本和python版本如下图我电脑是64位p...原创 2020-04-29 17:50:30 · 556 阅读 · 0 评论 -
解决:cannot use a string pattern on a bytes-like object
比如这段代码现在出现TypeError: cannot use a string pattern on a bytes-like objectimport urllib.requestimport redef getHtmlContent(url): page = urllib.request.urlopen(url) return page.read()def get...原创 2020-04-13 21:19:20 · 8354 阅读 · 0 评论 -
解决:module 'urllib' has no attribute 'urlretrieve'
比如这段代码现在出现AttributeError: module ‘urllib’ has no attribute ‘urlretrieve’import urllib.requestimport redef getHtmlContent(url): page = urllib.request.urlopen(url) return page.read()def ge...原创 2020-04-13 20:56:02 · 4814 阅读 · 3 评论 -
解决:module 'urllib' has no attribute 'urlopen'
比如这段代码现在出现AttributeError: module ‘urllib’ has no attribute ‘urlopen’import urllibimport redef getHtmlContent(url): page = urllib.urlopen(url) return page.read()def getJPGs(html): jpg...原创 2020-04-13 20:44:55 · 7627 阅读 · 2 评论 -
解决:'chromedriver' executable needs to be in PATH
解决:'chromedriver' executable needs to be in PATHWebDriverException: Message: 'chromedriver' executable needs to be in PATH使用driver = webdriver.Chrome(options = chrome_options)时报错 :`解决方法:第1步第2步第3步第4步第5...原创 2020-04-07 09:22:49 · 687 阅读 · 0 评论 -
解决:use options instead of chrome_options
解决:use options instead of chrome_options使用 selenium可以调用 谷歌、火狐等浏览器进行爬虫的爬取,比如这段代码出现use options instead of chrome_options:解决方法:使用 selenium可以调用 谷歌、火狐等浏览器进行爬虫的爬取,比如这段代码出现use options instead of chrome_opti...原创 2020-04-06 08:15:36 · 8266 阅读 · 7 评论 -
解决:Cannot unpack file; cannot detect archive format
解决:Cannot unpack file; cannot detect archive formatpip install chromedriver命令出错如下,安装超时解决方法:具体做法:若是想在安装package的时候再设置源,可以以这种方式来进行:pip install chromedriver命令出错如下,安装超时解决方法:更换pip下载源更改为国内清华大学镜像源,即可。具体...原创 2020-04-06 08:00:40 · 10720 阅读 · 7 评论 -
解决:name 'requests' is not defined
解决:name 'requests' is not defined比如这段代码现在出现NameError: name 'requests' is not defined解决方法:比如这段代码现在出现NameError: name ‘requests’ is not definedfrom bs4 import BeautifulSoupwords = ["旗帜", "计算机", "乾坤"...原创 2020-04-03 17:32:55 · 30113 阅读 · 4 评论