I am trying to get html content with all images from wikipeida using wikipeida's official API. Currently, The api i use only return html content
This is what i am Using
https://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=google&format=json&origin=*
Thanks in advance ๐
You can get text and images using the following query example
https://en.wikipedia.org/w/api.php?action=parse&prop=text|images&page=google&format=json&origin=*
Then for each image, you can get the url, which can be used to download the image. For example
https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&format=json&prop=imageinfo&titles=File%3ASemi-protection-shackle.svg&iiprop=url
Another example to get urls for all images on a page
https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&format=json&prop=imageinfo&rawcontinue=1&titles=google&generator=images&iiprop=url