Questions tagged [wikipedia]

Explore the tag mediawiki-api (or its broader version wikipedia-api) alongside mediawiki. Inquiries should pertain specifically to programming aspects.

The Wikipedia application programming interface (API) was unable to locate a particular web page (URL containing an apostrophe)

While I am able to retrieve pageviews info for other pages, I'm encountering an error when trying to fetch data from a particular page. The error message reads: File "<unknown>", line 1 article =='L'amica_geniale_ (serie_di_romanzi ...

Fetching a Wikipedia page using AJAX or the fetch() method

I am currently attempting to dynamically retrieve a Wikipedia webpage within the browser in order to utilize XSLTProcessor for further processing of the XHTML content. Unfortunately, my efforts have been unsuccessful as Wikipedia is not sending the necess ...

Compile a comprehensive list of all Wikipedia articles within a specific category and its corresponding subcategories

Is it possible to retrieve a comprehensive list of all Wikipedia articles within a specific category, including any subcategories? I attempted to extract the links from the category page using a PHP script, but it appears that obtaining a complete list of ...

Looking to automate the scraping of Wikipedia info boxes and displaying the data using Python for any Wikipedia page?

My current project involves automating the extraction and printing of infobox data from Wikipedia pages. For example, I am currently working on scraping the Star Trek Wikipedia page (https://en.wikipedia.org/wiki/Star_Trek) to extract the infobox section d ...

How can I use Beautiful Soup to retrieve the Q-number from a Wikidata item associated with a Wikipedia page?

Looking for the Wikidata item? You can locate it under Tools in the left sidebar of this Wikipedia page. Once you hover over it, you'll see the link address ending with a Q-number. . How do I extract the Q-number? from bs4 import BeautifulSoup import ...

Locate an image on Wikimedia Commons using its Filename

Whenever I make a call to the API at https://en.wikipedia.org/w/api.php using these parameters: "action": "query", "format": "json", "titles": "Albert Einstein", "prop": "images" The response only provides me with the titles of the corresponding images. ...

Accessing Data from the Wikipedia API

After receiving a JSON response with the following structure: { "batchcomplete": "", "query": { "pages": { "97646": { "pageid": 97646, "ns": 0, "title": "Die Hard", "extract": "Die Hard is a 1988 ...