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

Related tags

Miscellaneouszerochan
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
Labspy06 With Python

Labspy06 Profil Nama : Nafal mumtaz fuadi Nim : 312110457 Kelas : T1.21.A.2 Latihan 1 Ubahlah kode dibawah ini menjadi fungsi menggunakan lambda impor

Mas Nafal 1 Dec 12, 2021
Project of the MSEC_LDD . group

HackathonJuntionXHN Project of team MSEC_LQĐ What did we do? Building application to generate whitelist regex for Web application firewall How to setu

Nguyễn Mạnh Cường 0 Dec 19, 2021
Analyze FnO trends by using NSE Bhav copy

BhavFnO Analyze FnO trends by using NSE Bhav copy Download entire BhavFnO folder and unzip it In that folder open command window

33 Jan 04, 2023
Pytorch implementation of "Peer Loss Functions: Learning from Noisy Labels without Knowing Noise Rates"

Peer Loss functions This repository is the (Multi-Class & Deep Learning) Pytorch implementation of "Peer Loss Functions: Learning from Noisy Labels wi

Kushal Shingote 1 Feb 08, 2022
A python script based on OpenCV-Python, you can automatically hang up the Destiny 2 Throne to get the Dawning Essence.

A python script based on OpenCV-Python, you can automatically hang up the Destiny 2 Throne to get the Dawning Essence.

1 Dec 19, 2021
A simple python script to convert Rubber Ducky payloads into AutoHotKey scripts

AHKDuckyReplacer A simple python script to convert Rubber Ducky payloads into AutoHotKey scripts. I have also added a sample payload for testing. I wi

Krizsan0596 5 Sep 28, 2022
Aplicação que envia regularmente um email ao utilizador com todos os filmes disponíveis no cartaz dos cinemas Nos.

Cartaz-Cinemas-Nos Aplicação que envia regularmente uma notificação ao utilizador com todos os filmes disponíveis no cartaz dos cinemas Nos. Só funcio

Cavalex 1 Jan 09, 2022
Batch Python Program Verify

Batch Python Program Verify About As a TA(teaching assistant) of Programming Class, it is very annoying to test students' homework assignments one by

Han-Wei Li 7 Dec 20, 2022
Library for Memory Trace Statistics in Python

Memory Search Library for Memory Trace Statistics in Python The library uses tracemalloc as a core module, which is why it is only available for Pytho

Memory Search 1 Dec 20, 2021
Python-Kite: Simple python code to make kite pattern

Python-Kite Simple python code to make kite pattern. Getting Started These instr

Anoint 0 Mar 22, 2022
A nonebot2 plugin, send news information in a picture form.

A nonebot2 plugin, send news information in a picture form.

幼稚园园长 7 Nov 18, 2022
Download and process GOES-16 and GOES-17 data from NOAA's archive on AWS using Python.

Download and display GOES-East and GOES-West data GOES-East and GOES-West satellite data are made available on Amazon Web Services through NOAA's Big

Brian Blaylock 88 Dec 16, 2022
Uproot - A script to bring deeply nested files or directories to the surface

UPROOT Bring deeply nested files or folders to the surface Uproot helps convert

Ted 2 Jan 15, 2022
A simple calculator that can add, subtract, multiply or divide depending upon the input from the user

Calculator A simple calculator that can add, subtract, multiply or divide depending upon the input from the user. In this example, we should have the

Jayesh Mali 1 Dec 27, 2021
Transpiles some Python into human-readable Golang.

pytago Transpiles some Python into human-readable Golang. Try out the web demo Installation and usage There are two "officially" supported ways to use

Michael Phelps 318 Jan 03, 2023
Mnemosyne: efficient learning with powerful digital flash-cards.

Mnemosyne: Optimized Flashcards and Research Project Mnemosyne is: a free, open-source, spaced-repetition flashcard program that helps you learn as ef

359 Dec 24, 2022
inverted pendulum fuzzy control python code (python 2.7.18)

inverted-pendulum-fuzzy-control- inverted pendulum fuzzy control python code (python 2.7.18) We have 3 general functions for 3 main steps: fuzzificati

arian mottaghi 4 May 23, 2022
Double Pendulum implementation in Python, now with added pendulums and trails :D

Double Pendulum Using Curses in Python. A nice relaxing double pendulum simulation using ASCII, able to simulate multiple pendulums at once, and provi

Nekurone 62 Dec 14, 2022
Solutions for the Advent of Code 2021 event.

About 📋 This repository holds all of the solution code for the Advent of Code 2021 event. All solutions are done in Python 3.9.9 and done in non-real

robert yin 0 Mar 21, 2022
tgEasy | Easy for a Brighter Shine | Monkey Patcher Addon for Pyrogram

tgEasy | Easy for a Brighter Shine | Monkey Patcher Addon for Pyrogram

Jayant Hegde Kageri 35 Nov 12, 2022