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 (IPTC)
Main requirements
- Python 3.9+
- Selenium Wire 4.5.4+
- Exiftool 12.13+
- Chrome, Firefox, Safari and Edge are supported.
Installation
- Python
- PIP
- Windows
- python -m pip install --upgrade pip
- macOS
- curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
- python get-pip.py
- Windows
- Selenium Wire
- pip install selenium-wire
- 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: - 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. - Yandex to Lightroom
- pip install yandex2lightroom
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.
See also
The Lightroom plugin Import From Yandex offers an integration of Yandex to Lightroom into Lightroom.
Acknowledgements
Special thanks to Alexander Kozlov (https://pypi.org/project/yandex-images-download/). He did most of the work through his project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file yandex2lightroom-1.1.1.0.tar.gz
.
File metadata
- Download URL: yandex2lightroom-1.1.1.0.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8fa8b56f6d9feabc975706a3d770851e92874f91f1ceabe1efb21e36677c536 |
|
MD5 | 6db2a004d9b835ce10593aa7ea8203ce |
|
BLAKE2b-256 | bea1e929e241846765da80243fdd435e97bbc5984fb4f7428e0a48dda6731c58 |
File details
Details for the file yandex2lightroom-1.1.1.0-py3-none-any.whl
.
File metadata
- Download URL: yandex2lightroom-1.1.1.0-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e791e0f7c2a63e5b2a2f308839907dae22213393fe056f5b6c99fd2c8d0f29b4 |
|
MD5 | 66243d510244b019d87f700989cfd542 |
|
BLAKE2b-256 | d7ac7d6194e6c3cf0839ad487354b533f4c577f4699491eb3b9e56deb96ff25e |