Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7814113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:05:36+00:00 2026-06-02T05:05:36+00:00

I need to get the first image/ main image in any given wiki page.

  • 0

I need to get the first image/ main image in any given wiki page. I could use a scraping tool to do this. But I am using curl to scrap a page. But may be due to slow internet connection, it is taking a long time to scrap just one wiki page. Apart from that I need to display at least 7-8 different wiki images at the same time depending on user’s query.

So no point in using curl for this.
I tried wiki api

https://en.wikipedia.org/w/api.php?action=query&titles=India&prop=images&imlimit=1

But there are no other parameters that I can give to sort this list. Usually the first image this api is returning is not the main image which you see at the top of the page. Sometimes the image is too far from the context of the page.

I need to display just one image for each wiki title. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T05:05:38+00:00Added an answer on June 2, 2026 at 5:05 am

    Seems like the images are getting returned in alphabetical order…. weird.

    Anyway, this might work better:

    https://en.wikipedia.org/w/api.php?action=parse&text={{Barack_Obama}}&prop=images

    Unfortunately, only the first image is usable, but at least it’s the right one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Normally, we get first value that way: $(#color option:first).val() But I need something like
I need to get the first and last dimension of an numpy.ndarray of arbitrary
I have the following HTML and I need to get the first div parent
I need to get the value of the first checkbox which is checked and
I need a regular expression to basically get the first part of a string,
Just need get some vals located in application.ini(main ini) in the Controller plugin I
Need to get the 10 word before and 10 words after for the given
Hello pls could someone help... I've tried everything to get this to work in
I need to put first image on screen, then put the second after 1
I have a list of directory name and need to get the first letter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.