Wrapper for the official 4chan JSON API
Go to file
2023-09-16 14:07:53 -04:00
pychan Initial commit 2023-09-16 14:07:53 -04:00
.gitignore Initial commit 2023-09-16 14:07:53 -04:00
main.py Initial commit 2023-09-16 14:07:53 -04:00
README.md Initial commit 2023-09-16 14:07:53 -04:00
requirements.txt Initial commit 2023-09-16 14:07:53 -04:00

pychan

Python package for interacting with the 4chan JSON API.

Usage

from pychan.api import ChanAPI

api = ChanAPI()

# Get list of boards
boards = api.get_boards()

# Get catalog pages for a board
pol_catalog = api.get_catalog('po')

# Get high level stats for threads on a board
pol_threads = api.get_threads('po')

# Get a thread by thread number
thread = api.get_thread('po', 570368)

Notes

Object classes such as Board, Thread, and Post are in development and can be imported from pychan/models.py.