Skip to main content

Nozomi API for retrieving images, videos, gifs.

Project description

python-nozomi

Build Status Codacy Badge Codacy Badge PyPI version Python version

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

python-nozomi-2.0.0.tar.gz (8.5 kB view hashes)

Uploaded Source

Built Distribution

python_nozomi-2.0.0-py3-none-any.whl (8.7 kB view hashes)

Uploaded Python 3

Supported by

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