Skip to main content

Python 2ch.hk API wrapper

Project description

Codacy Badge

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

https://github.com/anonim-legivon/dvach.api/issues

License

Apache License 2.0 - https://www.apache.org/licenses/LICENSE-2.0

Project details


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)

Uploaded Source

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

Hashes for dvach.api-0.0.4.1.tar.gz
Algorithm Hash digest
SHA256 cbdce2b666c2576761da41b57dde9d502492391a9708133c4995bac38bc48982
MD5 1e835f67d536be65f9878511c8161863
BLAKE2b-256 b5d4f2b478f1164bef433c4744939914713c6045c9f7898faab67b088c8bbaa7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page