Manual:Pywikibot/pagegenerators.py/ja

pagegenerators.py は、他のスクリプト向けにページの一覧を生成するために使用される スクリプトです.

This module offers a wide variety of page generators. A page generator is an object that is iterable (see https://www.python.org/dev/peps/pep-0255/) and that yields page objects which other scripts can then use.

コマンドラインの使用法
The pagegenerators.py may not be executed directly. Instead, the script can be used.

例:

This will return, in standard output, a list of all pages containing "foobar", as returned by MediaWiki's search engine.

See for more details.

別のスクリプトからの呼び出し
Category crawler:

Subcategories explorer:

MySQL リクエスト ( 参照):

Unicode recommendation
The following code returns KeyError: 'query' because of the special character:

If searching in user and mediawiki namespaces, it would look like

Consequently, an encoding conversion is needed:

関連項目

 * More documentation can be found at docs.