Python MediaWiki Bot Framework
Project description
The Pywikibot framework is a Python library that interfaces with the MediaWiki API version 1.14 or higher.
Also included are various general function scripts that can be adapted for different tasks.
Quick start
git clone https://gerrit.wikimedia.org/r/pywikibot/core.git cd core git submodule update --init python pwb.py script_name
Our installation guide has more details for advanced usage.
Usage
If you wish to write your own script it’s very easy to get started:
import pywikibot site = pywikibot.Site('en', 'wikipedia') # The site we want to run our bot on page = pywikibot.Page(site, 'Wikipedia:Sandbox') page.text = page.text.replace('foo', 'bar') page.save('Replacing "foo" with "bar"') # Saves the page
Required external programms
It may require the following programs to function properly:
7za: To extract 7z files
Contributing
Our code is maintained on Wikimedia’s Gerrit installation, learn how to get started.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file pywikibot-2.0rc5.tar.gz
.
File metadata
- Download URL: pywikibot-2.0rc5.tar.gz
- Upload date:
- Size: 397.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | abbd5237977ef7e9795d37174870422ac2673687b0375093890540326c5181eb |
|
MD5 | e45bbc2cd83650d0d8ab6f45c924eadc |
|
BLAKE2b-256 | 4a33132823fb21c2b31719e0659a938a58622e2d296a514f4f48b3b30d3090cd |
File details
Details for the file pywikibot-2.0rc5-py3-none-any.whl
.
File metadata
- Download URL: pywikibot-2.0rc5-py3-none-any.whl
- Upload date:
- Size: 447.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20fab2634603684a6bb69556244a92e47b55632a8bae6acac8733d4b90b4b224 |
|
MD5 | f28424137b6a5b8225d6f1cd5a2da104 |
|
BLAKE2b-256 | 69b91cebc3ef65ce9f0f67a7167aaf6ee1d1e53294cf75f9af6eb040bf5a76b9 |
File details
Details for the file pywikibot-2.0rc5-py2-none-any.whl
.
File metadata
- Download URL: pywikibot-2.0rc5-py2-none-any.whl
- Upload date:
- Size: 447.9 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e02716d47cedac00361fec58a6ba4e7ad048de8bdb988a4a27cbc5d34dec1a2e |
|
MD5 | e04dc30c17a38b1bd26c071be575c64e |
|
BLAKE2b-256 | 052fb1edbb7c01e0c6bb196674fb9c7980736bdfcb3f6a5d94e94d7f0a89f238 |