python 爬取煎蛋妹子图片
本帖最后由 考拉熊 于 2018-10-29 11:06 编辑前一段之间一直在网上找爬取煎蛋妹子的教程,
一直都是破解js加密算法后,回去到图片的真是url
后来通过模拟无头浏览器headless Chrome,
先下载谷歌无头浏览器(前提是自己要有谷歌浏览器)
https://pan.baidu.com/s/18-tGwpgOCvS6HntVdVyqrg
米码: 5x8j
将无头浏览器放置在自己的同级文件夹下面,
也可以了解他的功能https://www.jianshu.com/p/11d519e2d0cb
请求回来的网页会自动加载js文件后,通过正则分析出来图片URL,进行保存。
解决图片加密问题,
源代码如下
**** Hidden Message ***** {:5_109:} haha1 厉害! 羡慕 1615598 发表于 2018-10-27 14:07
厉害!
我是初学者···互相学习 Lawliet666 发表于 2018-10-27 14:35
羡慕
互相学习,共同进步{:5_109:}{:5_109:}
本帖最后由 Lawliet666 于 2018-10-27 14:49 编辑
================== RESTART: C:\Users\Desktop\新建文本文档.py ==================
Traceback (most recent call last):
File "C:\Users\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start
stdin=PIPE)
File "C:\Users\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "C:\Users\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 997, in _execute_child
startupinfo)
FileNotFoundError: 系统找不到指定的文件。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Desktop\新建文本文档.py", line 25, in <module>
driver = webdriver.Chrome(chrome_options=chrome_options)
File "C:\Users\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in __init__
self.service.start()
File "C:\Users\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\common\service.py", line 83, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
>>> 我运行这个这样怎么回事{:10_266:} 学习 Lawliet666 发表于 2018-10-27 14:47
================== RESTART: C:%users\Desktop\新建文本文档.py ==================
Traceback (most rec ...
C:\ Users \ MI \ Desktop \ python \爬虫测试文件\煎蛋妹子\
这个是我的文件夹路径,
你的文件夹路径替换一下我这个就ok了 Lawliet666 发表于 2018-10-27 14:47
================== RESTART: C:%users\Desktop\新建文本文档.py ==================
Traceback (most rec ...
已经做了修改,,可以重新复制跑 每天学习一点点。 感谢分享 Traceback (most recent call last):
File "C:\Users\duhao\AppData\Local\Programs\Python\Python35-32\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start
stdin=PIPE)
File "C:\Users\duhao\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "C:\Users\duhao\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 1224, in _execute_child
startupinfo)
FileNotFoundError: 系统找不到指定的文件。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:/workspace/Exercise/jiandan.py", line 32, in <module>
driver = webdriver.Chrome(chrome_options=chrome_options)
File "C:\Users\duhao\AppData\Local\Programs\Python\Python35-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in __init__
self.service.start()
File "C:\Users\duhao\AppData\Local\Programs\Python\Python35-32\lib\site-packages\selenium\webdriver\common\service.py", line 83, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
想抓兔子的云 发表于 2018-10-29 09:53
先下载谷歌无头浏览器(前提是自己要有谷歌浏览器)
https://pan.baidu.com/s/18-tGwpgOCvS6HntVdVyqrg
米码:5x8j
将无头浏览器放置在自己的同级文件夹下面,
也。可以了解他的功能https://www.jianshu.com/p/11d519e2d0cb 666666666666666 吱吱 啊u的改革菲亚乌 强呀 呵呵