Nozomi API for retrieving images, videos, gifs.
Project description
python-nozomi
nozomi.la API in Python.
Features
- Retrieving media posts
- Downloading media
Installation
$ pip install python-nozomi
Upgrade
$ pip install python-nozomi --upgrade
Example Usage
Retrieve and download a single post provided a URL
from pathlib import Path
from nozomi import api
url = 'https://nozomi.la/post/26905532.html#veigar'
# Retrieve post metadata using the URL
post = api.get_post(url)
# Download the post
api.download_media(post, Path.cwd())
Retrieve and download multiple posts provided a list of URLs
from pathlib import Path
from nozomi import api
urls = [
'https://nozomi.la/post/26905532.html#veigar',
"https://nozomi.la/post/26932594.html#cho'gath",
'https://nozomi.la/post/25802243.html#nautilus'
]
# Retrieve all of the post metadata using the URLs
posts = api.get_posts(urls)
# Download the posts
for post in posts:
api.download_media(post, Path.cwd())
Retrieve and download all posts containing certain tags
# The tags that the posts retrieved must contain
positive_tags = ['veigar', 'wallpaper']
# Gets all posts with the tags 'veigar', 'wallpaper'
for post in api.get_posts_with_tags(positive_tags):
api.download_media(post, Path.cwd())
Retrieve all posts containing certain tags, ignoring blacklisted tags
# The blacklisted tags
negative_tags = ['chogath']
# Gets all posts with the tags 'veigar' and 'wallpaper' without the 'chogath' tag.
for post in api.get_posts_with_tags(positive_tags, negative_tags):
api.download_media(post, Path.cwd())
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
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 python-nozomi-2.0.0.tar.gz.
File metadata
- Download URL: python-nozomi-2.0.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90b7dc9c3dc29f6ad8693cabb1a548ce6317a2d88ba45b65d65681feb6f43884
|
|
| MD5 |
218607004e0e165de3934fd188d3b80b
|
|
| BLAKE2b-256 |
9286e1959ccae0f7e56ef1c7ddc1fd8ab51868dd86703c423aecffb5962ec294
|
File details
Details for the file python_nozomi-2.0.0-py3-none-any.whl.
File metadata
- Download URL: python_nozomi-2.0.0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f9c075cc482ce891afd5c864c684b871239be907e45692f501e93619be7b8e8
|
|
| MD5 |
7166a1786d5b817084a2510a6f06539b
|
|
| BLAKE2b-256 |
ba76308bb4a5d002ed265196b4af94b4cc7379f6beac8036c21497e004f1d9dc
|