• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ohyicong/Google-Image-Scraper: A library to scrap google images

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

ohyicong/Google-Image-Scraper

开源软件地址(OpenSource Url):

https://github.com/ohyicong/Google-Image-Scraper

开源编程语言(OpenSource Language):

Python 87.1%

开源软件介绍(OpenSource Introduction):

Google Image Scraper

A library to scrap google images.
If you are looking for other image scrapers.
JJLimmm has created an image scrapper for getty, shuttershock, and bing.
Visit his repo here: https://github.com/JJLimmm/Website-Image-Scraper

Pre-requisites:

  1. Pip install Selenium Library
  2. Pip install PIL
  3. Download Google Chrome
  4. Download Google Webdriver based on your Chrome version

Setup:

  1. Open cmd
  2. Clone the repository (or download)
    git clone https://github.com/ohyicong/Google-Image-Scraper
    
  3. Install Dependencies
    pip install -r requirements.txt
    
  4. Run the code
    python main.py
    

Usage:

#Import libraries (Don't change)
from GoogleImageScrapper import GoogleImageScraper
import os
from patch import webdriver_executable

#Define file path (Don't change)
webdriver_path = os.path.normpath(os.path.join(os.getcwd(), 'webdriver', webdriver_executable()))
image_path = os.path.normpath(os.path.join(os.getcwd(), 'photos'))

#Add new search key into array ["cat","t-shirt","apple","orange","pear","fish"]
search_keys= ["cat","t-shirt"]

#Parameters
number_of_images = 10
headless = True
min_resolution=(0,0)
max_resolution=(1920,1080)

#Main program
for search_key in search_keys:
    image_scrapper = GoogleImageScraper(webdriver_path,image_path,search_key,number_of_images,headless,min_resolution,max_resolution)
    image_urls = image_scrapper.find_image_urls()
    image_scrapper.save_images(image_urls)

Youtube Video:

IMAGE ALT TEXT

Do remember to like, share and subscribe!




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
googlecodelabs/google-maps-simple-store-locator发布时间:2022-06-22
下一篇:
google-map-react/old-examples: Examples for google-map-react component.发布时间:2022-06-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap