Touhou-ura
Python tool to get or/and download data from touhou-ura threads (futaba).
Installation
pip install touhou-ura
Requirements: requests, tqdm, beautifulsoup4
Usage
from touhou_ura import ThUra
th_ura = ThUra()
Methods
-
threads_all()
Get all threads currently shows. [Return: list]Optional params:
- sort: (1=latest, 2=oldest, 3=comments(desc), 4=comments(asc), 6/8=no idea)
- x: Rows to return (default: 20)
- y: Columns to return (default: 10)
- l: Title length (default: 4)
- thumbnail_size: Size of thumbnail (0~6, default: 6)
-
get_thread_images(id)
Get image links(src) from a thread. [Return: list]Params:
- id: Thread ID (You can find it on the url) https://dec.2chan.net/55/res/{THREAD_ID}.htm
-
download_images(id, directory=None, custom=False)
Download images form a thread. By default, images will be saved on your desktop in 'touhou_ura/images' (Creates if does not exist)Params:
- id: Thread ID
- directory: Directory you want to save (optional).
- custom: (optional)
Example:
import os from touhou_ura import ThUra th_ura = ThUra() directory = os.path.expanduser("~/Desktop/some_folder") th_ura.download_images(id, directory) # Will be saved at ~Desktop/some_folder/touhou_ura/images/{id} th_ura.download_images(id, directory, True) # Will be saved at ~Desktop/some_folder
-
download_archive(id, directory=None, custom=False)Download archive of a thread (html, css & images). By default, archives will be saved on your desktop in 'touhou_ura/archives' (Creates if does not exist)Params:
- id: Thread ID
- directory: Directory you want to save (optional).
- custom: (optional)
Example:
import os from touhou_ura import ThUra th_ura = ThUra() directory = os.path.expanduser("~/Desktop/some_folder") th_ura.download_archive(id, directory) # Will be saved at ~Desktop/some_folder/touhou_ura/archives/{id} th_ura.download_archive(id, directory, True) # Will be saved at ~Desktop/some_folder
More features coming soon
License
MIT License
Metadata
Release files for touhou-ura 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| touhou-ura-0.0.1.tar.gz | 8.9 kB | Without provenance | Details for touhou-ura-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| touhou_ura-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for touhou_ura-0.0.1-py3-none-any.whl |
Total release size: 18.9 kB
Release files / touhou-ura-0.0.1.tar.gz
| Download URL | touhou-ura-0.0.1.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a6a925be8e8ea1fa4fa159bd8254e0d9f81ad38bab2d37dec3c3e4df0d5c1b58
|
|
BLAKE2b-256 checksum How to use checksums |
e5035b76949fb90cf03a47ca3dc6afeae94817ea23f6d2d4754b4cf75b4c4e9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
|
Release files / touhou_ura-0.0.1-py3-none-any.whl
| Download URL | touhou_ura-0.0.1-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e82fdeb63176061570786bab86b79961742da099447981098690667fa92f96bf
|
|
BLAKE2b-256 checksum How to use checksums |
deca96ed36a36660a3818bd1380e01f22b51cd7f1653abf2e53331b02188e8b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
|
Security for touhou-ura 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.