Skip to main content

Python Script to download images from Yandex.Images for the use in Adobe Lightroom.

Project description

Yandex to Lightroom

Python Script to download images from Yandex.Images for using in Adobe Lightroom.

Features

  • Checking for captcha presence
  • Many filters
  • Multiproccessing is available (option --num-workers)
  • Existing images can be skipped.
  • Set search keywords as Lightroom keywords.
  • Set image url as creator web address (IPC)

Main requirements

  • Python 3.9+
  • Selenium Wire 2.1.2+
  • Exiftool 12.13+
  • Chrome, Firefox, Safari and Edge are supported.

Installation

  1. Python
  2. PIP
  3. Selenium Wire
    • pip install selenium-wire
  4. Selenium driver executable
    Get the right driver for your browser (see browser section on the link above) and platform. Firefox, Chrome, Safari and Edge are supported.
    Use option --driver-path to specify the driver's path or add the executable in your PATH.
    Additional helpful pages:
  5. Exiftool
    The exiftool executable must added in your PATH. For macOS, it is done automatically by putting it into /usr/local/bin. For Windows, you must extend your PATH variable.

Examples

Simple example using Chrome WebDriver:

$ yandex2lightroom Chrome --keywords "vodka, bears, balalaika" --limit 10

Example of using keywords from input file with specific image extension/format:

$ yandex2lightroom Chrome --keywords_from_file input_example.txt --itype=png

All other information can be obtained with the --help argument.

Use case textures for Photoshop

Yandex2Lightroom sets keywords in the images after download. The keywords are the same as you define for the searches itself. To build a useful library for wall textures in Lightroom we need different searches with meaningful keywords. We should place these searches - better: the corresponding Yandex2Lightroom commands - into a batch or shell script file. Thereby, we are able to repeat the download commands to a later point in time again. For Windows y2lr-texture-wall.bat

@echo off
rem brick, cracked
yandex2lightroom Chrome --keywords "wall white brick cracked" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
yandex2lightroom Chrome --keywords "wall red brick cracked" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
yandex2lightroom Chrome --keywords "wall black brick cracked" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
yandex2lightroom Chrome --keywords "wall yellow brick cracked" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
rem brick, old
yandex2lightroom Chrome --keywords "wall white old brick" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
yandex2lightroom Chrome --keywords "wall red old brick" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
yandex2lightroom Chrome --keywords "wall black old brick" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
yandex2lightroom Chrome --keywords "wall yellow old brick" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
rem concrete cracked
yandex2lightroom Chrome --keywords "wall white concrete cracked" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
yandex2lightroom Chrome --keywords "wall red concrete cracked" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
yandex2lightroom Chrome --keywords "wall black concrete cracked" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
yandex2lightroom Chrome --keywords "wall yellow concrete cracked" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
rem concrete old
yandex2lightroom Chrome --keywords "wall white old concrete" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
yandex2lightroom Chrome --keywords "wall red old concrete" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
yandex2lightroom Chrome --keywords "wall black old concrete" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
yandex2lightroom Chrome --keywords "wall yellow old concrete" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
rem brick, new
yandex2lightroom Chrome --keywords "wall white new brick" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
yandex2lightroom Chrome --keywords "wall red new brick" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
yandex2lightroom Chrome --keywords "wall black new brick" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
yandex2lightroom Chrome --keywords "wall yellow new brick" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
rem concrete, new
yandex2lightroom Chrome --keywords "wall white new concrete" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
yandex2lightroom Chrome --keywords "wall red new concrete" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
yandex2lightroom Chrome --keywords "wall black new concrete" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls
yandex2lightroom Chrome --keywords "wall yellow new concrete" --limit 50 --isize large --skip-existing  --output-directory D:\Users\johndoe\Lightroom\Yandex\photos\library\texture\walls

For macOS y2lr-texture-wall.sh

#!/usr/bin/env bash
# brick, cracked
yandex2lightroom Chrome --keywords "wall white brick cracked" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
yandex2lightroom Chrome --keywords "wall red brick cracked" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
yandex2lightroom Chrome --keywords "wall black brick cracked" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
yandex2lightroom Chrome --keywords "wall yellow brick cracked" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
# brick, old
yandex2lightroom Chrome --keywords "wall white old brick" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
yandex2lightroom Chrome --keywords "wall red old brick" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
yandex2lightroom Chrome --keywords "wall black old brick" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
yandex2lightroom Chrome --keywords "wall yellow old brick" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
# concrete cracked
yandex2lightroom Chrome --keywords "wall white concrete cracked" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
yandex2lightroom Chrome --keywords "wall red concrete cracked" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
yandex2lightroom Chrome --keywords "wall black concrete cracked" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
yandex2lightroom Chrome --keywords "wall yellow concrete cracked" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
# concrete old
yandex2lightroom Chrome --keywords "wall white old concrete" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
yandex2lightroom Chrome --keywords "wall red old concrete" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
yandex2lightroom Chrome --keywords "wall black old concrete" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
yandex2lightroom Chrome --keywords "wall yellow old concrete" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
# brick, new
yandex2lightroom Chrome --keywords "wall white new brick" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
yandex2lightroom Chrome --keywords "wall red new brick" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
yandex2lightroom Chrome --keywords "wall black new brick" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
yandex2lightroom Chrome --keywords "wall yellow new brick" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
# concrete, new
yandex2lightroom Chrome --keywords "wall white new concrete" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
yandex2lightroom Chrome --keywords "wall red new concrete" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
yandex2lightroom Chrome --keywords "wall black new concrete" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls
yandex2lightroom Chrome --keywords "wall yellow new concrete" --limit 50 --isize large --skip-existing  --output-directory /Users/johndoe/Lightroom/Yandex/photos/library/texture/walls

After the images were downloaded, import them into LR:

  • Just add, of course.
  • Maybe not use your standard metadata preset.

Please check the keywords. Sometimes LR does not import them all. In Adobe Bridge they are fine, but not in LR. If so, select all images and read in the metadata again.
Also, some images may have no keywords because the exiftool run into a problem. There is a smart collection in LR to look for images without keywords. So at least you have a chance to set keywords manually.

Acknowledgements

Special thanks to Alexander Kozlov (https://pypi.org/project/yandex-images-download/). He did most of the work through his project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yandex2lightroom-1.0.6.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

yandex2lightroom-1.0.6-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file yandex2lightroom-1.0.6.tar.gz.

File metadata

  • Download URL: yandex2lightroom-1.0.6.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.22.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1

File hashes

Hashes for yandex2lightroom-1.0.6.tar.gz
Algorithm Hash digest
SHA256 de7fc27f15971f8f7dc037ae615ada227be8802966431bcbf055da32ee3ae293
MD5 6f9a62faff408656365a7673265cf2c7
BLAKE2b-256 26e1642c658f08de40593dbf4be8ca2a080c56aa37859ea10225d6dba99c2645

See more details on using hashes here.

Provenance

File details

Details for the file yandex2lightroom-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: yandex2lightroom-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.22.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1

File hashes

Hashes for yandex2lightroom-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 5855c767761825faa4aebd2b596a460a6cd3cb18345f1f48d33c4886bf0b0a4a
MD5 285170e6856a0a284eceb5018d74005a
BLAKE2b-256 6a904e6c1498ab4fc11589e84b9ebdd7fd8edcec131ef0409dde07e8386c7753

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page