Returning a List of Images in Appearance Order #32
-
I'm working on something and want to blindly pull the first image from an article, assuming that it is most likely an actor/celebrity/politician's photo. When I call getImagesOnPage, the result is a list of images in alphabetical order. I was looking through the code to see where the sorting was taking place, and I wasn't quite able to figure it out. Is the sort already applied to the JSON/GSON object that is being parsed? I'm just trying to figure out if there's a way I can squeeze in an option for on page appearance order, either by forking and just doing my own thing, or forking and bringing it back as a feature. Any hints would be appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @WilliamHerbert, As far as I know, this is not possible with the API. You may have better luck scraping and parsing the HTML of the page(s) in question |
Beta Was this translation helpful? Give feedback.
-
If you want the featured image, you'd have a much easier time scraping it off of the "Information" page: https://en.wikipedia.org/w/index.php?title=Rowan_Atkinson&action=info |
Beta Was this translation helpful? Give feedback.
If you want the featured image, you'd have a much easier time scraping it off of the "Information" page: https://en.wikipedia.org/w/index.php?title=Rowan_Atkinson&action=info