谷歌工具箱下载 app(google工具下载)
一个通过搜索关键词,下载谷歌的搜索结果图片的爬虫。比如:配置了关键词“猫”,“狗”,运行代码,就会把Google搜索中“猫”、“狗”的图片分别以目录的方式保存。代码运行中会弹出Chome浏览器,这是在模拟浏览器访问,不用管就行了。
开源:https://github.com/ohyicong/Google-Image-Scraper
安装使用很简单,配置好python环境后,安装分三步:
git clone https://github.com/ohyicong/Google-Image-Scraperpip install selenium, requests, pillowpython main.py
样例代码,也就是main.py的代码也很简单:
#Import libraries from GoogleImageScrapper import GoogleImageScraperimport osfrom patch import webdriver_executable#Define file path webdriver_path = os.path.normpath, 'webdriver', webdriver_executable))image_path = os.path.normpath, 'photos'))#Add new search key into array ["cat","t-shirt","apple","orange","pear","fish"]search_keys= ["cat","t-shirt"]#Parametersnumber_of_images = 10headless = Truemin_resolution=max_resolution=#Main programfor search_key in search_keys: image_scrapper = GoogleImageScraper image_urls = image_scrapper.find_image_urls image_scrapper.save_images
海外精品引流脚本–最强海外引流
唯一TG:https://t.me/Facebook181818
更多海外引流脚本方案
如果你需要脚本演示、部署咨询或海外获客方案,可以通过下面入口继续查看。
