Skip to main content

Library for search 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.fetcher import FetcherImage

# создание обьекта
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


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-2.3.4.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lib_fetcher_image-2.3.4-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file lib_fetcher_image-2.3.4.tar.gz.

File metadata

  • Download URL: lib_fetcher_image-2.3.4.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for lib_fetcher_image-2.3.4.tar.gz
Algorithm Hash digest
SHA256 47401fde613b2c335b9b1835241cb708f2931df5b931073aef857e2cddf4f04d
MD5 9c51656a1df872f0d2255f5bb4de314c
BLAKE2b-256 32e8a9ae9a1d04de8ade4998b50df9e5055ed429c46058035c0170a2f6ee54e3

See more details on using hashes here.

File details

Details for the file lib_fetcher_image-2.3.4-py3-none-any.whl.

File metadata

File hashes

Hashes for lib_fetcher_image-2.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8dd76777635b46464e84d899b192d33f3a80a4a29fda09375b4459635ab88333
MD5 d5d64575350ab6f97e0edd41162b4c06
BLAKE2b-256 60baf0feb583f2dbb487b00f333705e9bde874e1cc0a7d8103bfe4b985a50021

See more details on using hashes here.

Supported by

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