示例#1
0
import random
from api2ch import Api

# create object api
dvach = Api()

# select section
dvach.board = "pr"

# fetch list of threads
threads = dvach.get_board()

# select random thread and fetch posts
for post in dvach.get_thread(random.choice(list(threads))):
    print post
示例#2
0
from api2ch import Api

# create object api
dvach = Api()

# select section
dvach.board = "pr"

# fetch list of threads
for thread in dvach.get_board():
    print thread