qiuwenbot.task package

Tasks.

Submodules

qiuwenbot.task.duplicate module

Check duplicated page with different variants of Chinese titles, such as zh-cn and zh-hk.

class qiuwenbot.task.duplicate.CheckDuplicatedPageTask(user: str, password: str, pages: dict)[source]

Bases: Task

A task to check duplicated pages.

Parameters:
userstr

Username.

passwordstr

Password.

pagesstr

Pages to operate.

Methods

do(page)

Do the task.

logging(title)

Log the removing operator.

submit()

Submit the task.

do(page: Page) bool[source]

Do the task.

qiuwenbot.task.duplicate.check_page(page: Page, site: Site)[source]

Check if a page has duplicated variants.

qiuwenbot.task.filter module

class qiuwenbot.task.filter.FilterTask(user: str, password: str, pages: dict)[source]

Bases: Task

A task to pass filters.

Parameters:
userstr

Username.

passwordstr

Password.

pagesstr

Pages to operate.

Methods

do(page)

Do the task.

logging(title)

Log the removing operator.

submit()

Submit the task.

do(page: Page) bool[source]

Do the task.

qiuwenbot.task.task module

class qiuwenbot.task.task.Task(user: str, password: str, pages: dict, logging_page: str = None, summary: str = '')[source]

Bases: object

A task to be done.

Parameters:
userstr

Username.

passwordstr

Password.

pagesdict

Pages to operate.

logging_pagestr, optional

Page to log the task, by default None

summarystr, optional

Summary of the task, by default emptry string

Methods

do(page)

Do the task.

logging(title)

Log the removing operator.

submit()

Submit the task.

abstract do(page: Page) bool[source]

Do the task.

logging(title: str) None[source]

Log the removing operator.

Parameters:
titlestr

title of the modified page

submit()[source]

Submit the task.