Python library and cli util for https://www.zerochan.net/

Overview

Zerochan

Library for Zerochan.net with pics parsing and downloader included!

Features

  • CLI utility for pics downloading from zerochan.net
  • Library for create custom downloader (you can write own) or data analyze.
  • Strong typed!

Installation:

Using pip

pip install zerochan

Using poetry

poetry add zerochan

Using as downloader tool:

After install you can call zerochan by command python -m zerochan

Using as library:

First, you should create Zerochan instance:

from zerochan import ZeroChan

zerochan_instance = ZeroChan()

Now, you can set some args for request

from zerochan import ZeroChan, PictureSize, SortBy

zerochan = ZeroChan()

zerochan.search("Spain")  # Set title to search
zerochan.size(PictureSize.BIGGER_AND_BETTER) # Set quality and pic size
zerochan.sort(SortBy.POPULAR) # Set sorting (now only popular)
zerochan.page(1) # Page to parse
zerochan.authorize("hjsaf7afkjsaf78", "127364") # Authorize by z_hash and z_id in cookies

...or set args like this:

zerochan.search("Spain")\
    .size(PictureSize.BIGGER_AND_BETTER)\
    .sort(SortBy.POPULAR)

After all settings, you should call .pics() to get pics:

data = zerochan.pics()
for img in data.images:
    print(img.url)
You might also like...
Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls
Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls

guess-the-numbers Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls Number guessing game

Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls
Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls

password-generator Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls Password generator

Cirq is a Python library for writing, manipulating, and optimizing quantum circuits and running them against quantum computers and simulators
Cirq is a Python library for writing, manipulating, and optimizing quantum circuits and running them against quantum computers and simulators

Cirq is a Python library for writing, manipulating, and optimizing quantum circuits and running them against quantum computers and simulators. Install

Msgpack serialization/deserialization library for Python, written in Rust using PyO3 and rust-msgpack. Reboot of orjson. msgpack.org[Python]

ormsgpack ormsgpack is a fast msgpack library for Python. It is a fork/reboot of orjson It serializes faster than msgpack-python and deserializes a bi

PyPIContents is an application that generates a Module Index from the Python Package Index (PyPI) and also from various versions of the Python Standard Library.

PyPIContents is an application that generates a Module Index from the Python Package Index (PyPI) and also from various versions of the Python Standar

🔩 Like builtins, but boltons. 250+ constructs, recipes, and snippets which extend (and rely on nothing but) the Python standard library. Nothing like Michael Bolton.

Boltons boltons should be builtins. Boltons is a set of over 230 BSD-licensed, pure-Python utilities in the same spirit as — and yet conspicuously mis

🔩 Like builtins, but boltons. 250+ constructs, recipes, and snippets which extend (and rely on nothing but) the Python standard library. Nothing like Michael Bolton.

Boltons boltons should be builtins. Boltons is a set of over 230 BSD-licensed, pure-Python utilities in the same spirit as — and yet conspicuously mis

App and Python library for parsing, writing, and validation of the STAND013 file format.

python-stand013 python-stand013 is a Python app and library for parsing, writing, and validation of the STAND013 file format. Features The following i

This Python library searches through a static directory and appends artist, title, track number, album title, duration, and genre to a .json object

This Python library searches through a static directory (needs to match your environment) and appends artist, title, track number, album title, duration, and genre to a .json object. This .json object is then used to post data to a specified table in a local MySQL database, credentials of which the user must set.

Comments
  • Can't grab pages past page 1

    Can't grab pages past page 1

    $ python -m zerochan --title "Izumi Konata" -c
    [2021-11-06 15:23:52.705522] [REQUEST]: Get page 1/23
    [2021-11-06 15:23:53.333511] [PARSER]: Getting image 2556x3599 10566kB: https://static.zerochan.net/Izumi.Konata.full.3428965.jpg with size 2556x3599 10566
    [2021-11-06 15:23:53.333537] [PARSER]: Getting image 531x745 317kB: https://static.zerochan.net/Izumi.Konata.full.3381253.jpg with size 531x745 317
    [2021-11-06 15:23:53.333546] [PARSER]: Getting image 598x924 458kB: https://static.zerochan.net/Izumi.Konata.full.3357849.jpg with size 598x924 458
    [2021-11-06 15:23:53.333552] [PARSER]: Getting image 848x1200 916kB: https://static.zerochan.net/Izumi.Konata.full.3304551.jpg with size 848x1200 916
    [2021-11-06 15:23:53.333557] [PARSER]: Getting image 1191x1684 1772kB: https://static.zerochan.net/Izumi.Konata.full.3080143.png with size 1191x1684 1772
    [2021-11-06 15:23:53.333563] [PARSER]: Getting image 1000x1642 1835kB: https://static.zerochan.net/Izumi.Konata.full.2994168.jpg with size 1000x1642 1835
    [2021-11-06 15:23:53.333568] [PARSER]: Getting image 945x901 135kB: https://static.zerochan.net/Izumi.Konata.full.2721947.jpg with size 945x901 135
    [2021-11-06 15:23:53.333573] [PARSER]: Getting image 1500x1500 2456kB: https://static.zerochan.net/Izumi.Konata.full.2710828.png with size 1500x1500 2456
    [2021-11-06 15:23:53.333580] [PARSER]: Getting image 1500x1500 565kB: https://static.zerochan.net/Izumi.Konata.full.2710823.png with size 1500x1500 565
    [2021-11-06 15:23:53.333585] [PARSER]: Getting image 808x1122 383kB: https://static.zerochan.net/Izumi.Konata.full.2652229.jpg with size 808x1122 383
    [2021-11-06 15:23:53.333590] [PARSER]: Getting image 1000x1200 482kB: https://static.zerochan.net/Izumi.Konata.full.2566493.png with size 1000x1200 482
    [2021-11-06 15:23:53.333595] [PARSER]: Getting image 780x545 272kB: https://static.zerochan.net/Izumi.Konata.full.2402751.jpg with size 780x545 272
    [2021-11-06 15:23:53.333600] [PARSER]: Getting image 1920x1200 817kB: https://static.zerochan.net/Izumi.Konata.full.2314075.png with size 1920x1200 817
    [2021-11-06 15:23:53.333605] [PARSER]: Getting image 1680x1050 460kB: https://static.zerochan.net/Izumi.Konata.full.2184423.jpg with size 1680x1050 460
    [2021-11-06 15:23:53.333610] [PARSER]: Getting image 640x888 388kB: https://static.zerochan.net/Izumi.Konata.full.2015285.jpg with size 640x888 388
    [2021-11-06 15:23:53.333614] [PARSER]: Getting image 600x600 205kB: https://static.zerochan.net/Izumi.Konata.full.1886848.jpg with size 600x600 205
    [2021-11-06 15:23:53.333619] [PARSER]: Getting image 860x1214 701kB: https://static.zerochan.net/Izumi.Konata.full.1780621.jpg with size 860x1214 701
    [2021-11-06 15:23:53.333624] [PARSER]: Getting image 848x1200 495kB: https://static.zerochan.net/Izumi.Konata.full.1752328.jpg with size 848x1200 495
    [2021-11-06 15:23:53.333629] [PARSER]: Getting image 1647x916 1606kB: https://static.zerochan.net/Izumi.Konata.full.1710991.jpg with size 1647x916 1606
    [2021-11-06 15:23:53.333634] [PARSER]: Getting image 1960x1240 3273kB: https://static.zerochan.net/Izumi.Konata.full.1615642.jpg with size 1960x1240 3273
    [2021-11-06 15:23:53.333638] [PARSER]: Getting image 1024x911 223kB: https://static.zerochan.net/Izumi.Konata.full.1587182.jpg with size 1024x911 223
    [2021-11-06 15:23:53.333643] [PARSER]: Getting image 600x600 297kB: https://static.zerochan.net/Izumi.Konata.full.1518316.jpg with size 600x600 297
    [2021-11-06 15:23:53.333648] [PARSER]: Getting image 900x1260 258kB: https://static.zerochan.net/Izumi.Konata.full.1508713.jpg with size 900x1260 258
    [2021-11-06 15:23:53.333653] [REQUEST]: Get page 2/23
    Traceback (most recent call last):
      File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "/home/chameleon/.local/lib/python3.9/site-packages/zerochan/__main__.py", line 136, in <module>
        data_page = get_pics(zerochan.page(i))
      File "/home/chameleon/.local/lib/python3.9/site-packages/zerochan/__main__.py", line 100, in get_pics
        return zerochan_instance.pics()
      File "/home/chameleon/.local/lib/python3.9/site-packages/zerochan/lib.py", line 124, in pics
        page = int(str_list[4])
    ValueError: invalid literal for int() with base 10: 'of'
    

    Maybe they moved the page number around?

    opened by japanoise 0
Releases(0.5.0)
Owner
kiriharu
Python developer and sysadmin
kiriharu
A Python package to request and process seismic waveform data from Hi-net.

HinetPy is a Python package to simplify tedious data request, download and format conversion tasks related to NIED Hi-net. NIED Hi-net | Source Code |

Dongdong Tian 65 Dec 9, 2022
Visualize Data From Stray Scanner https://keke.dev/blog/2021/03/10/Stray-Scanner.html

StrayVisualizer A set of scripts to work with data collected using Stray Scanner. Usage Installing Dependencies Install dependencies with pip -r requi

Kenneth Blomqvist 45 Dec 30, 2022
Simple utlity for sniffing decrypted HTTP/HTTPS traffic on a jailbroken iOS device into an HAR format.

Description iOS devices contain a hidden feature for sniffing decrypted HTTP/HTTPS traffic from all processes using the CFNetwork framework into an HA

null 83 Dec 25, 2022
Automatização completa do site https://blaze.com

PyBlaze Pyblaze possibilita o acesso a api do site blaze utilizando python, retornando os últimos resultados de crashs e doubles. Agora também é possí

Cleiton Leonel 24 Dec 30, 2022
Laurence Billingham 1 Feb 16, 2022
Cross-platform .NET Core pre-commit hooks

dotnet-core-pre-commit Cross-platform .NET Core pre-commit hooks How to use Add this to your .pre-commit-config.yaml - repo: https://github.com/juan

Juan Odicio 5 Jul 20, 2021
Заглушки .NET библиотек для IronPython

Код репозитория основан на ironpython-stubs. Выражаю gtalarico бесконечную благодарность за вклад в развитие сообщества разработчиков скриптов и плаги

null 12 Nov 23, 2022
Yet another Airflow plugin using CLI command as RESTful api, supports Airflow v2.X.

中文版文档 Airflow Extended API Plugin Airflow Extended API, which export airflow CLI command as REST-ful API to extend the ability of airflow official API

Eric Cao 106 Nov 9, 2022
JLC2KICAD_lib is a python script that generate a component library for KiCad from the JLCPCB/easyEDA library.

JLC2KiCad_lib is a python script that generate a component library (schematic, footprint and 3D model) for KiCad from the JLCPCB/easyEDA library. This script requires Python 3.6 or higher.

Nicolas Toussaint 73 Dec 26, 2022
K2HASH Python library - NoSQL Key Value Store(KVS) library

k2hash_python Overview k2hash_python is an official python driver for k2hash. Install Firstly you must install the k2hash shared library: curl -o- htt

Yahoo! JAPAN 3 Oct 19, 2022