Python 2ch.hk API wrapper
Project description
2ch.hk API Wrapper
Requirements
Python (3.4, 3.5, 3.6)
Install
pip install api2ch
Usage
Getting threads on board
from api2ch import Api api = Api('b') board = api.get_board() for thread in board: print(f'Num: {thread.num}, Replies: {thread.reply_count}, Post: {thread.post.comment}')
Getting posts in thread
from api2ch import Api api = Api('abu') thread = api.get_thread(42375) for post in thread: print(post.comment)
Getting top of threads on board
from api2ch import Api api = Api() # board='доска', method='метод сортировки (views, score, posts), num=количество тредов top = api.get_top(board='pr', method='posts', num=10) for thread in top: print(thread)
Bug tracker
Warm welcome for suggestions and concerns
License
Apache License 2.0 - https://www.apache.org/licenses/LICENSE-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dvach.api-0.0.4.1.tar.gz
(5.7 kB
view hashes)