'How do I get the picture of a country from its name using python?

I am trying to build a website that is similar to worldle, except that it allows you to play unlimited times. I have a list of all the countries in the world, but I want to be able to get the picture of the country once I randomly select a country. Is there a library or API that allows me to do this, or do I have to manually download a picture of every country?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source