56 questions
-2
votes
1
answer
104
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?
0
votes
1
answer
99
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 ...
2
votes
1
answer
871
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 ...
0
votes
1
answer
53
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, ...
0
votes
1
answer
276
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 ...
1
vote
1
answer
262
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, ...
0
votes
1
answer
492
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
...
-2
votes
1
answer
206
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 ...
0
votes
1
answer
496
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 ...
2
votes
1
answer
1k
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 ...
2
votes
1
answer
657
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 ?...
-1
votes
1
answer
117
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 ...
0
votes
1
answer
242
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....
4
votes
0
answers
110
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)
...
1
vote
1
answer
140
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 ...