Skip to content

piotrantosz/google-arts-crawler

Repository files navigation

Google Arts & Culture crawler

Google Arts & Culture high quality image downloader

Download images from Google Arts and Culture in high resolution

Using this script you can download any image from https://artsandculture.google.com/ in high quality (even 12k!)

Warning: it's simple and ugly code created at one night. It might be full of bugs. Feel free to do anything you want with this code

Installation

Anconda And Pipenv

  • Use Anconda to init Python3.6

    conda create -n py36 python=3.6

  • Active Python3.6

    conda activate py36

    python -V

  • Install pipenv

    pip install pipenv

  • Init pipenv environment

    git clone https://github.com/Boquete/google-arts-crawler.git

    cd google-arts-crawler/

    pipenv install

  • Run

    python crawler.py

    python api-example.py

Linux

  • git clone https://github.com/Boquete/google-arts-crawler.git
  • cd google-arts-crawler/
  • virtualenv venv
  • source venv/bin/activate
  • pip3 install -r requirements.txt
  • python3 crawler.py

Windows

Usage

If there is a string containing "artsandculture.google.com" in your clipboard the script will attempt to run it as the input url and use the default image size, otherwise you will be asked for:

In Windows, feel free to instead use the provided docrawl.bat file for ease of use (e.g. binding it to a keyboard/mouse key with your control software). It is programmed to assume Administrator privileges automatically and can be customized with image size presets.

Output

After script ends, your image (.jpg)w ill be located at:

outputs/image_name.jpg

Problems

  1. chromedriver executable needs to be in PATH

You can download ChromeDriver here: https://sites.google.com/a/chromium.org/chromedriver/downloads . Then you have multiple options:

  • add it to your system path (usually C:\Users\USERNAME\AppData\Local\Programs\Python\PythonXX-XX)
  • put it in the same directory as your python script
  • specify the location directly via executable_path driver = webdriver.Chrome(executable_path='C:/path/to/chromedriver.exe')

( https://stackoverflow.com/a/40556092/4807171 )