It seems like the only way to get approval for a Bot account is if it adds to or edits information already on Wikimedia. If you try to download any images, without a bot account, using some of the api libraries out there you get error messages…
Currently I have two MediaWikis, one a slightly older version than the other. I want to merge the contents of both together, without eliminating duplicate pages. So far the best option I can think of is to use a bot (like pywikipedia) to go…
I've built some report tools using Pywikibot. As things are growing it now takes up to 2 hours to finish the reports so I'm looking to speed things up. Main ideas:
Disable throttling, the script is read-only, so page.get(throttle=False) handles…
I'm using pywikibot-core, and I used before another python Mediawiki API wrapper as Wikipedia.py (which has a .HTML method). I switched to pywikibot-core 'cause I think it has many more features, but I can't find a similar method.
(beware: I'm not…
I need to get the content of an infobox of any movie. I know the name of the movie. One way is to get the complete content of a Wikipedia page and then parse it until I find {{Infobox and then get the content of the infobox.
Is there any other way…
I am currently following the Python 3 Tutorial for Pywikibot and continue to experience attribute errors while running the included code from the tutorial as seen below.
import pywikibot
site = pywikibot.Site("en", "wikipedia")
page =…
Using this example, how do I retrieve the values of interaction on the electron page?
I am stuck at this
item_dict = item.get()
clm_dict = item_dict["claims"]
clm_list = clm_dict["P2069"]
for clm in clm_list:
clm_trgt = clm.getTarget()
All I…
I was wondering if I could get some help setting up Pywikibot.
I was able to download it using
git clone --recursive https://gerrit.wikimedia.org/r/pywikibot/core.git
following wikipedia page instructions.
Where I get lost is when trying to create…
I have some experience in Python, but I have never used try & except functions to catch errors due to lack of formal training.
I am working on extracting a few articles from wikipedia. For this I have an array of titles, a few of which do not have…
We have an internal wiki and I want to use pywikibot to get some data from it. Installed it from pip but when I import it I get:
>>> import pywikibot
Traceback (most recent call last):
File "", line 1, in
File…
The MediaWiki API has an edit function which is available within pywikibot.
According to https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.site.html
the function is called with a page parameter:
editpage(page, summary=None, minor=True,…
I have a large (50K+ pages) Mediawiki wiki, and I need to efficiently get a list of all pages, sorted by last update time. I'm working in Python using pywikibot. The documentation hints that this is possible, but I haven't decoded how to do it…
I want to run pywikibot from inside Docker container, so I could run some cron jobs with it from the cloud (maybe Azure).
I added code of my bot and user-config.py file to my Docker container, but when it tries to update some page, it uses getpass…
I am currently using pywikibot to obtain the categories of a given wikipedia page (e.g., support-vector machine) as follows.
import pywikibot as pw
print([i.title() for i in list(pw.Page(pw.Site('en'), 'support-vector machine').categories())])
The…
I'm using the wikipedia library and I want to handle the DisambiguationError as an exception. My first try was
try:
wikipedia.page('equipment') # could be any ambiguous term
except DisambiguationError:
pass
During execution line 3 isn't…