Library for search and downloading images
Project description
lib-fetcher-image
lib-fetcher-image это библиотека Python для поиска изображений,
а так же получения на них ссылок в случае успеха с возможностью скачивания
Установка из PyPI
pip install lib-fetcher-image
Использование репозитория GitHub
git clone https://github.com/YuranIgnatenko/lib-fetcher-image.git
cd lib-fetcher-image
pip install .
Пример использования
# импорт библиотеки
from lib_fetcher_image import FetchImage
# создание обьекта
fetcher_image = FetcherImage()
# параметры
pattern = "Море" # строка поиска (поддерживает: ru, en)
max_image = 2 # макс. кол-во ссылок в ответе в случае успеха
# if max_image == -1 : возвращать все значения до конца
# else: вернуть столько же или меньше
# получение ссылок
list_urls = fetcher_image.get_images_urls(pattern, max_image)
# list_urls: ["http://../file.jpg", "http://../file.jpg"]
# скачивание файла по ссылке
fetcher_image.download(list_urls[0], "image.jpg")
# создание итератора используя
# строку запроса: pattern
i = 0
for url in fetcher_image.search_iterator(pattern, max_image):
print(f"{i}-{url}")
i+=1
# создание итератора популярных изображений
i = 0
for url in fetcher_image.popular_iterator(max_image):
print(f"{i}-{url}")
i+=1
using sources from site:
https://million-wallpapers.ru
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
lib_fetcher_image-1.4.tar.gz
(2.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lib_fetcher_image-1.4.tar.gz.
File metadata
- Download URL: lib_fetcher_image-1.4.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0030afb87d85639e2a1f61f508c9e65a1ef1ef8aa9c81b2e0e0ecd8ae8b22abf
|
|
| MD5 |
0d088550f68ced02e8ac44f6c17690a2
|
|
| BLAKE2b-256 |
763dafeac22996834a68054ba0cb52fe31e5079dbbd013ddc7013a0560b06ecb
|
File details
Details for the file lib_fetcher_image-1.4-py3-none-any.whl.
File metadata
- Download URL: lib_fetcher_image-1.4-py3-none-any.whl
- Upload date:
- Size: 2.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc8e527b453c2e76bdb324444575f0d11d4f787bf50f0e34c3a02f1b02272bc9
|
|
| MD5 |
61428e31599015fd7191f5d5b465f624
|
|
| BLAKE2b-256 |
149d10c16d2945aa64f3be495e92c5052b8201d382105d9f57e1fdcc2ef6e3e2
|