Questions tagged [pywikibot]

Pywikibot is a Python library to access the MediaWiki API.

Pywikibot

Pywikibot is a library to access the MediaWiki API. Its former name was .

Useful links

119 questions
0
votes
1 answer

How do I get Wikipedia article text after a certain revision occured?

I am using Pywikibot to get article text from Wikipedia, specifically pywikibot.Page().get(). I want all the Wiki Markup as well. The get() method gives this to me but only for the page at the current time. Is there a way to get the article text…
0
votes
0 answers

How to extract multiple Wikipedia articles at once?

I am using Python 2.7 Anaconda. I have used the Wikipedia Python package to extract a list of article titles: titles = wikipedia.random(pages=1000).decode('utf-8') titles_encoded = [x.encode('utf-8') for x in titles] Is there a way of using…
ishido
  • 4,065
  • 9
  • 32
  • 42
0
votes
2 answers

Can regex do this?

Before: =={{int:filedesc}}== {{Information |description = wikiwoordenboek audio |date = |source = |author = |permission = |other_versions = }} [[Category:Dutch pronunciation|Example]] Is it possible to find whatever is between | and ]], and then…
0
votes
1 answer

python 2.x wikipedia parsing

I have this code: import urllib from bs4 import BeautifulSoup base_url='https://en.wikipedia.org' start_url='https://en.wikipedia.org/wiki/Computer_programming' outfile_name='Computer_programming.csv' no_of_links=10 fp=open(outfile_name,…
Lila
  • 121
  • 1
  • 1
  • 7
0
votes
1 answer

Pywikibot Login SSLError 185090050

Previously I had no problem with Pywikibot library and site.login(). From last week, calling this method returns the following warning and error messages: WARNING: Waiting 40 seconds before retrying. ERROR: Traceback (most recent call last): File…
1man
  • 5,216
  • 7
  • 42
  • 56
0
votes
1 answer

How do I get the pageid from a Wikipedia page?

In a Flask app, or even better just using wikipedia APIs, how can I get the pageid from a Wikipedia url? I mean from this http://en.wikipedia.org/wiki/Stack_Overflow to this http://en.wikipedia.org/wiki?curid=21721040 From the API sandbox I can…
Luca Brozzi
  • 335
  • 1
  • 3
  • 15
0
votes
1 answer

Why pywikibot give in out put?

I use PywikiBot core version in linux to create a program to simply get categories of a Wikipedia page.my code is: # -*- coding: utf-8 -*- import pywikibot site = pywikibot.Site("en") page = pywikibot.Page(site, u"Wikipedia:Sandbox") item =…
0
votes
1 answer

Retrieving # contributors on a Wikipedia page using MediaWiki API, "without retrieving the names and other information"

I am using MediaWiki API, trying to retrieve the number of known and anonymous contributors all together on a Wikipedia page, but the only property that I found is "contributors", which returns all the data about the contributors, so it is really…
1man
  • 5,216
  • 7
  • 42
  • 56
0
votes
1 answer

Pywikibot Error "Warning: Token not found on Example:de. You will not be able to edit any page"

I tried to install Pywikibot. So far so good, the bot is able to log in, apparently access api.php, but when I want to run a script it says: Warning: Token not found on Example:de. You will not be able to edit any page I tried to search on the…
Klerafukan
  • 53
  • 6
0
votes
2 answers

pywikipedia login.py socket.error: (10060, 'Operation timed out')

I'm totally new to python, so hopefully someone can help if I'm doing something obviously wrong. I'm trying to create and run a simple pywikipedia bot on vocabularies.referata.com, a semantic mediawiki site. I downloaded the pywikipedia distro and…
stu73
  • 3
  • 2
-1
votes
2 answers

pywikipedia logging in?

For various reasons I can't use login.py to log me in so I was wondering if anyone knew code so that I could log in to Wikipedia with my script without running a separate script? Cheers!
Jack Pennel
-1
votes
2 answers

How to stop auto-generation of log files by cron?

I have a bot on Marathi language wikipedia. The bot runs from Wikimedi's toolforge server. I have set up a cron job which generates two files: one .err and another is .out Following is my the content from my cron file: 0 9 * * * jsub -release buster…
-1
votes
1 answer

Any api to download all excel files stored in mediawiki server for data analysis with pandas?

I have a python script to do data analysis given a set of excel files. Now we are trying to automate this step by periodically searching the mediawiki server for any recent excel file uploads and apply my script. We are trying to see if there's any…
-2
votes
2 answers

Pywikibot MediaWiki Query API

I have a data dump of Wikipedia articles listed only by their pageid, and I am hoping to filter them by namespace. It would be relatively easy to write some python (probably using the requests module) to call the MediaWiki Query API, to query for…
brubsby
  • 388
  • 2
  • 13
1 2 3 4 5 6 7
8