Async nozomi.la API for Python3.
NozomiPy-Async is an Async Python3 library for nozomi.la API.
NozomiPy-Async also provides a commandline tool to download images and tags from nozomi.la.
Based on Python-Nozomi: https://github.com/Alfa-Q/python-nozomi
pip install nozomipy-async
from nozomipy.async_api import api
import asyncio
from nozomipy.async_api import api
nozomi_api = api(semaphore=8,proxy="http://127.0.0.1:1080")
# The tags that the posts retrieved must contain
positive_tags = ['veigar', 'wallpaper']
# Gets all posts with the tags 'veigar', 'wallpaper'
posts = await nozomi_api.get_posts()
# download all images
await asyncio.gather(*[download_img_tags(post,path) for post in posts])
Download images and tags during a period to a folder named with positive tags.
nozomi --path "./" --positive_tags 'miyase_mahiro' --start_date 2022-02-22 --end_date 2022-01-22 --num_process=8 --proxy http://127.0.0.1:7890
The files in dataset should be:
├─miyase_mahiro
│ img1.jpg
│ img1.txt
│ img2.png
│ img2.txt
│ img3.jpg
│ img3.txt
│ ...
│ metadata.json