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
Repo created for the purpose of adding any kind of programs and projects

Programs and Project Repository A repository for adding programs and projects of any kind starting from beginners level to expert ones Contributing to

Unicorn Dev Community 3 Nov 02, 2022
Badge-Link-Creater 'For more beautiful profiles.'

Badge-Link-Creater 'For more beautiful profiles.' Ready Badges Prepares the codes of the previously prepared badges for you. Note Click here for more

Mücahit Gündüz 9 Oct 19, 2022
SECRET SANTA / KRIS KINGLE

SECRET SANTA / KRIS KINGLE Note: Before executing the script, make sure to turn

DEV_FINWIZ 10 Dec 06, 2022
Replite - An embeddable REPL powered by JupyterLite

replite An embeddable REPL, powered by JupyterLite. Usage To embed the code cons

Jeremy Tuloup 47 Nov 09, 2022
3x+1 recreated in Python

3x-1 3x+1 recreated in Python If a number is odd it is multiplied by 3 and 1 is added to the product. If a number is even it is divided by 2. These ru

4 Aug 19, 2022
Test pour savoir si je suis capable de paratger une lib avec le monde entier !!

Data analysis Document here the project: MLproject Description: Project Description Data Source: Type of analysis: Please document the project the bet

Lucas_Penarrubia 0 Jan 18, 2022
A plugin for poetry that allows you to execute scripts defined in your pyproject.toml, just like you can in npm or pipenv

poetry-exec-plugin A plugin for poetry that allows you to execute scripts defined in your pyproject.toml, just like you can in npm or pipenv Installat

38 Jan 06, 2023
Simplest way to find Appointments in Bürgeramt Berlin, Not over engineered.

Simplest way to find Appointments in Bürgeramt Berlin, Not over engineered. Der einfachste Weg, Termine im Bürgeramt Berlin zu finden, ohne viel Schnickschnack.

Jannis 8 Nov 25, 2022
A repository of study materials related to Think Python 2nd Edition by Allen B. Downey. More information about the book can be found here: https://greenteapress.com/wp/think-python-2e/

Intro-To-Python This content is based on the book Think Python 2nd Edition by Allen B. Downey. More information about the book can be found here: http

Brent Eskridge 63 Jan 07, 2023
Delayed iteration for polling and retries.

Does Python need yet another retry / poll library? It needs at least one that isn't coupled to decorators and functions. Decorators prevent the caller

A. Coady 22 Dec 29, 2022
Companion Web site for Fluent Python, Second Edition

Fluent Python, the site Source code and content for fluentpython.com. The site complements Fluent Python, Second Edition with extra content that did n

Fluent Python 49 Dec 08, 2022
CPLib is the abbreviation of Competitive Programming Library.

CPLib CPLib is the abbreviation of Competitive Programming Library. It aims to be a general template and optimization library for competitive programm

12 Oct 16, 2021
Simple Wayland HotKey Daemon

swhkd Simple Wayland HotKey Daemon This project is still very new and I'm making new decisions everyday as to where I should drive this project. I'm u

Aakash Sen Sharma 407 Dec 30, 2022
Running a complete single-node all-in-one cluster instance of TIBCO ActiveMatrix™ BusinessWorks 6.8.0.

TIBCO ActiveMatrix™ BusinessWorks 6.8 Docker Image Image for running a complete single-node all-in-one cluster instance of TIBCO ActiveMatrix™ Busines

Federico Alpi 1 Dec 10, 2021
Telegram bot for Urban Dictionary.

Urban Dictionary Bot @TheUrbanDictBot A star ⭐ from you means a lot to us! Telegram bot for Urban Dictionary. Usage Deploy to Heroku Tap on above butt

Stark Bots 17 Nov 24, 2022
A one place destination to check whatever is trending on the top social and news websites at present.

UpTrend A one place destination to check whatever is trending on the top social and news websites at present. Explore the docs » View Demo · Report Bu

Google Developer Student Clubs - JGEC 10 Oct 03, 2021
This repo is related to Google Coding Challenge, given to Bright Network Internship Experience 2021.

BrightNetworkUK-GCC-2021 This repo is related to Google Coding Challenge, given to Bright Network Internship Experience 2021. Language used here is py

Dareer Ahmad Mufti 28 May 23, 2022
A quick experiment to demonstrate Metamath formula parsing, where the grammar is embedded in a few additional 'syntax axioms'.

Warning: Hacked-up code ahead. (But it seems to work...) What it does This demonstrates an idea which I posted about several times on the Metamath mai

Marnix Klooster 1 Oct 21, 2021
Sabe is a python framework written for easy web server setup.

Sabe is a python framework written for easy web server setup. Sabe, kolay web sunucusu kurulumu için yazılmış bir python çerçevesidir. Öğrenmesi kola

2 Jan 01, 2022
TurtleBot Control App - TurtleBot Control App With Python

TURTLEBOT CONTROL APP INDEX: 1. Introduction 2. Environments 2.1. Simulated Envi

Rafanton 4 Aug 03, 2022