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 details)
File details
Details for the file dvach.api-0.0.4.1.tar.gz.
File metadata
- Download URL: dvach.api-0.0.4.1.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbdce2b666c2576761da41b57dde9d502492391a9708133c4995bac38bc48982
|
|
| MD5 |
1e835f67d536be65f9878511c8161863
|
|
| BLAKE2b-256 |
b5d4f2b478f1164bef433c4744939914713c6045c9f7898faab67b088c8bbaa7
|