Batch download wikimedia traffic_sign svg images

I am working on an OSM/QGIS project where I need a lot/all of traffic_sign images (svg) of the Netherlands. I see there are many freely available at wikimedia but I do not feel like downloading one by one. I searched the net for tooling but was not successfull. Some are too complicated for me and others just do not grab .svg images. Anyone with a good idea?

Have you tried the API? I‘ve never used it but can imagine that downloading all files from a category might be possible.

You can easily get a list of the file URLs like this:

curl -o - 'https://commons.wikimedia.org/wiki/Category:SVG_road_signs_in_the_Netherlands' | grep -o -P 'https://upload.wikimedia.org/wikipedia/commons/thumb/[^ ]*\.svg\.png' | sed -e 's/thumb\///g; s/\.svg\/.*/.svg/g' | sort | uniq

And then just download and zip them.

Update: Did that for you, here is the ZIP for download.

9 Likes

Thanks a lot @Nadjita . I will try this myself . I have used Curl in the past but never thought of that.

1 Like

2 more questions that I hope you can answer @Nadjita . I am missing svg of some sub-pages like from this one. Is there any clever way to add svg of sub-pages?

[edit] I think I should have linked to this page in my first post instead. [/edit]

Any suggestion on how I should do that? Is it adding an extra curl command. (e.g. downloading to C:\download) ?