56 questions
Score of -2
1 answer
117 views
How to upload a file to commons.wikimedia.org with an API?
I want to upload many files, doing it with HTML UI will require a lot of repetitive actions. How to authorize and upload files programmatically?
Score of 0
1 answer
106 views
Why does the CSRF token from the Wikimedia API only work for 1-2 hours after login, then stop working?
I am using the Wikimedia API with Basic Authorization and Cookie-based authentication. Initially, after logging in, I can retrieve the CSRF token without issues. However, after about 1-2 hours, any ...
Score of 2
1 answer
1017 views
How to download images using wikimedia commons API
I'm attempting to complete an app that I need to download images from Wikimedia Commons using their API, in a similar way to using their online search at https://commons.wikimedia.org/. Using their ...
Score of 0
1 answer
56 views
Writing JavaScript for automatization - node.click() is not enough - page still think that no radio button is selected
I am writing my userscript for Wikiedia Commons, for this block:
I tried
node.click()
node.dispatchEvent(new MouseEvent('click'))
node.dispatchEvent(new MouseEvent('click', {bubbles: true, ...
Score of 0
1 answer
288 views
How to query Wikidata in order to get all the species of flowers?
I’m trying to write a query that retrieves all the species of flowers in Wikidata.
As far as I understood, flowers are represented by class Q506: https://www.wikidata.org/wiki/Q506. Therefore I tried ...
Score of 1
1 answer
281 views
API call to get Wikimedia Commons user's uploads with categories and wikitext
How do I modify the example at https://commons.wikimedia.org/wiki/Commons:API/MediaWiki#Get_files_uploaded_by_a_particular_user to also list the categories each page is
in, the wikitext of the page, ...
Score of 0
1 answer
525 views
Getting ALL picture file names from wikimedia commons search
So I'm trying to get all the picture files names for a wikimedia image search, but I'm only getting 10 results.
As an example, I tried running:
import json
from io import StringIO
import pandas as pd
...
Score of -2
1 answer
215 views
How do I combine Wikipedia Commons maps into one display?
I am currently working on a project where I am looking to map out a set of state routes. After picking x amount, I want to construct one aggregate map of those routes so that I can visualize them ...
Score of 0
1 answer
507 views
Retrieve Wikimedia Commons Category of a Wikipedia page using the Wikimedia API
I am trying to use the Wikimedia Api to get the corresponding Wikimedia Commons category to a specific Wikipedia page. I assume that it is possible as most Wikipedia pages include an "in other ...
Score of 2
1 answer
1052 views
Get image summary with Wikidata SPARQL
I get some images from Wikidata, but I would like to get more information about the image.
By example, I get the image from Paris (Try it!):
SELECT ?itemLabel ?wdLabel ?ps_Label ?wdpqLabel ?pq_Label ...
Score of 2
1 answer
672 views
Get geojson data from Wikidata
I request Wikidata entities and get their geoshape property (P3896).
For example (try it):
SELECT ?item ?itemLabel ?geoshape ?geoshapeLabel
WHERE
{
VALUES ?item { wd:Q142 }
?item wdt:P3896 ?...
Score of -1
1 answer
123 views
How can I create a Python Script with BeautifulSoup on Windows to download the highest resolution of each picture in a WIkimedia Commons folder?
So, I'm a big fan of Gustave Doré, and I would like to download all his engravings from the Wikimedia Commons folders that are neatly organized.
So, given a Wikimedia Commons folder I need to download ...
Score of 0
1 answer
249 views
Mediawiki API: Query picture from Wikimedia Commons with parameter "pageid"
The query below using the file name of the picture works flawlessly:
https://www.mediawiki.org/w/api.php?action=query&prop=globalusage&gulimit=20&titles=File:Ferrari%20Roma%20in%20Basel....
Score of 4
0 answers
113 views
scraping wikimedia category trees
I want to use R to scrape the links contained within a wikimedia category tree and the structure of the tree from here. The code below can open up all the collapsible bullet points
library(RSelenium)
...
Score of 1
1 answer
154 views
Get list of pages using an image hosted on Wikimedia commons through API
I'd like to get the file usage on other wikis for a given image on Wikimedia Commons through API.
For example the image https://commons.wikimedia.org/wiki/File:2015_Finland_opinion_polls.png is used ...