How can I scrape .svg images from Wikipedia into Google Sheets?
What I've discovered so far:
- Google Sheets'
IMAGE()
function doesn't work for .svg files - The images I want to grab from Wikipedia are .svg files. E.g., Wikipedia - Hawaii in US svg image
- By clicking through the .svg files on Wikipedia, I can get to a .png preview. E.g., Wikipedia - Hawaii in US png image. This does work with Google Sheets'
IMAGE()
function. - But there is no consistent structure to the .png image addresses, so I'm not able to grab these programmatically. E.g. compare the address for Hawaii versus the address for Arizona.
I ultimately would like to have a Google Sheet with:
- Column A: state name
- Column B: wikipedia image of state as territory in the US
I thought I could achieve that programmatically with the following:
- Column A: state name
- Column B:
IMAGE(<image url in column C>)
- Column C: url (based on formula) of .png Wikipedia image of state as territory in the US
But that won't work for the reasons I gave above. I'm ready to venture into using more complicated tools if that's necessary.