Manual:Pywikibot/Create your own script/ko

이 문서는 직접 봇을 만들어가는 데 있어서 매우 기초적인 팁이 수록되어 있습니다. 파일을 설정했는지 꼭 확인해주세요!

You can either use the following commands in a shell, or in a script.

To open a shell, run ;

As a script, please save the file as  in the   directory, then run.


 * To gain access to the pywikibot library from your Python script, use:


 * to retrieve a page, use the following, where pageName is the title of the page you would like to retrieve, e.g., Wikipedia:Bots or India:


 * to update a page, use:


 * look at some of the pywikibot files for other ideas --  is relatively easy to read even if you're new to pywikibot.


 * you can find all available Page methods in the  file.


 * gives you a setup that can be used for many different bots, all you have to do is define the string editing on the page text.


 * To iterate over a set of pages, see pywikibot/pagegenerators.py (see also old documentation) for some objects that return a set of pages. An example use of the CategoryPageGenerator that does something for each page in the Category:Living people category:

같이 보기

 * Pywikibot full documentation on doc.wikimedia.org