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
B-Pkg is a simple tool in python for installing all basic package in termux

Basic-Pkg 👉🏻 Basic-Pkg 👈🏻 B-Pkg is a simple tool in python for installing all basic package in termux This is my first tool, I hope you will like

Macgaiver 3 Oct 21, 2021
Gives you more advanced math in python.

AdvancedPythonMath Gives you more advanced math in python. Functions .simplex(args: {number}) .circ(args: {raidus}) .pytha(args: {leg_a + leg_2}) .slo

Voidy Devleoper 1 Dec 25, 2021
UFDR2DIR - A script to convert a Cellebrite UFDR to the original file structure

UFDR2DIR A script to convert a Cellebrite UFDR to it's original file and directo

DFIRScience 25 Oct 24, 2022
Comprehensive Python Cheatsheet

Comprehensive Python Cheatsheet

Jure Šorn 31.3k Dec 30, 2022
Repositório de código de curso de Djavue ministrado na Python Brasil 2021

djavue-python-brasil Repositório de código de curso de Djavue ministrado na Python Brasil 2021 Completamente baseado no curso Djavue. A diferença está

Buser 15 Dec 26, 2022
A tool to assist in code raiding in rust

Kodelock a tool to assist in code raiding in rust This tool is designed to be used on a second monitor. This tools will allow you to see a easily read

3 Oct 27, 2022
Programa principal de la Silla C.D.P.

Silla CDP Página Web Contáctenos Lista de contenidos: Información del proyecto. Licencias. Contacto. Información del proyecto Silla CDP, o Silla Corre

Silla Control de Postura 1 Dec 02, 2021
Qt-creator-boost-debugging-helper - Qt Creator Debugging Helper for Boost Library

Go to Tools Options Debugger Locals & Expressions. Paste the script path t

Dmitry Bravikov 2 Apr 22, 2022
Master Duel Card Translator Project

Master Duel Card Translator Project A tool for translating card effects in Yu-Gi-Oh! Master Duel. Quick Start (for Chinese version only) Download the

67 Dec 23, 2022
Neptune client library - integrate your Python scripts with Neptune

Lightweight experiment tracking tool for AI/ML individuals and teams. Fits any workflow. Neptune is a lightweight experiment logging/tracking tool tha

neptune.ai 353 Jan 04, 2023
Encode and decode cancro lang files to and from brainfuck

cancrolang Encode and decode cancro lang files to and from brainfuck. examples python3 main.py -f hello.cancro --run Hello World! the interpreter is n

witer33 1 Dec 20, 2021
A code ecosystem that helps to find the equate any formula.

A code ecosystem that helps to find the equate any formula. The good part here is that the code finds the formula needed and/or operates on a formula (performs algebra) on it to give you an answer.

SubtleCoder 1 Nov 23, 2021
Simulation simplifiée du fonctionnement du protocole RIP

ProjetRIPlay v2 Simulation simplifiée du fonctionnement du protocole RIP par Eric Buonocore le 18/01/2022 Sur la base de l'exercice 5 du sujet zéro du

Eric Buonocore 2 Feb 15, 2022
Python 101 Forever

🚀 Python 101 Forever 🚀 Official Python 101 Forever GitHub repository. START HERE - CHECK README SUBSCRIBE FOR UPDATES HERE Sponsors Contac

Hack Bulgaria 58 Nov 30, 2022
KUIZ is a web application quiz where you can create/take a quiz for learning and sharing knowledge from various subjects, questions and answers.

KUIZ KUIZ is a web application quiz where you can create/take a quiz for learning and sharing knowledge from various subjects, questions and answers.

Thanatibordee Sihaboonthong 3 Sep 12, 2022
👀 nothing to see here

Woofy Woofy is blue dog companion token of YFI (Wifey) It utilizes a special Woof bonding curve which allows two-way conversion between the tokens. Th

Yearn Finance 36 Mar 14, 2022
Unofficial Python implementation of the DNMF overlapping community detection algorithm

DNMF Unofficial Python implementation of the Discrete Non-negative Matrix Factorization (DNMF) overlapping community detection algorithm Paper Ye, Fan

Andrej Janchevski 3 Nov 30, 2021
Script em python, utilizando PySimpleGUI, para a geração de arquivo txt a ser importado no sistema de Bilhetagem Eletrônica da RioCard, no Estado do Rio de Janeiro.

pedido-vt-riocard Script em python, utilizando PySimpleGUI, para a geração de arquivo txt a ser importado no sistema de Bilhetagem Eletrônica da RioCa

Carlos Bruno Gomes 1 Dec 01, 2021
【幼盾】个性化图片徽章服务!

【幼盾】个性化图片徽章服务! 你对方形的徽章感到无聊了吗?想要定制属于自己的开源项目徽章了吗? 快来使用unv-shield吧! unv-shield提供包含自定义图片的徽章服务,可以让你的项目主页更加个性化!

黄巍 130 Dec 23, 2022
Python client SDK designed to simplify integrations by automating key generation and certificate enrollment using Venafi machine identity services.

This open source project is community-supported. To report a problem or share an idea, use Issues; and if you have a suggestion for fixing the issue,

Venafi, Inc. 13 Sep 27, 2022