网络爬虫
Hummer-200
这个作者很懒,什么都没留下…
展开
-
爬虫实战:制作简单的页面采集器
以百度为例制作简单的页面采集器首先尝试利用百度搜做引擎搜索任意信息:url如下:观察可知 我们需要的URL如下:https://www.baidu.com/s?wd=123首先利用python脚本发送请求:import requestsurl = 'https://www.baidu.com/s'kw = input('please input your keywords:')param = { 'wd':kw}headers = { 'User-Agent':'Mo原创 2021-07-11 22:02:03 · 339 阅读 · 0 评论 -
selenium.common.exceptions.WebDriverException: Message: Service chromedriver unexpectedly exited.
python seleium.webdriver.Chrome()调用的时候报错:selenium.common.exceptions.WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 1亲测,原因是调用Chrome()的时候找不到chromedriver.exe。解决方法如下:到Anaconda3\Lib\site-packages\selenium\webdriver原创 2021-07-05 19:55:27 · 4850 阅读 · 1 评论 -
python3爬虫实战:requests库+正则表达式爬取头像
python3爬虫实战:爬取情侣头像网站url:https://www.woyaogexing.com/touxiang/qinglv/new/浏览网页:可以发现每个图片都链接到了另一个网页我们需要获取主目录中的每个图片对应的另一个html页面的url,再从这些url中提取图片获得要爬取的网页的htmlimport requestsresponse = requests.get('https://www.woyaogexing.com/touxiang/qinglv/new/')respo原创 2021-07-04 13:12:04 · 431 阅读 · 0 评论