Metadata-Version: 2.4
Name: getenmagen
Version: 0.1.0
Summary: A library to quickly get or download images from the internet.
Author-email: Pedro Antonio Rodrigues <pedro.a.rodrigues7@gmail.com>
Keywords: bing,crawler,downloader,image,pillow
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Requires-Dist: icrawler>=0.6.0
Requires-Dist: pillow>=10.0.0
Description-Content-Type: text/markdown

**Getenmagen** is a lib to quickly get or download images from the internet. You can search images by any queries or terms, download multiple images a time, just the way you prefer.

**Here's a example of how you can use it right now:**

```python
import os, random
from Getenmagen.core import download_and_show as download_images, DownloadImageError

if __name__ == "__main__":
    SAVE_DIR = os.path.dirname(os.path.abspath(__file__)) # -> This is the default path where your .py file is running, but you can use any path, such as /Documents, /Downloads...

    # ↓ Below, you can use any amount of images you want to download, as long as it's within the established limits. You can customize the queries of your search and cooldowns for each image, if you need.
    recommended_queries = ["cats", "dogs", "family", "food"]
    recommended_qts = [1, 2, 3]
    recommended_cooldowns = [0.0, 1.0, 1.5, 2.0, 2.5]

    # ↓ Below, you should use a try/except to prevent unexpected errors. (Note: importing "DownloadImageError" is also recommended to catch download errors).
    try:
        print("Testing the capture of images...")

        results = download_images(
            query=random.choice(recommended_queries),
            save_dir=SAVE_DIR,
            qt=random.choice(recommended_qts),
            cooldown=random.choice(recommended_cooldowns),
        )

        print(f"Success! Images saved on: \"{SAVE_DIR}\"!")

    except DownloadImageError as e:
        print(f"An error occurred while downloading: {e}")

    except Exception as e:
        print(f"An unknown error occurred: {e}")
```