U
U
UniFild4452021-12-14 10:04:49
Python
UniFild445, 2021-12-14 10:04:49

Where can I find api links?

Where can I find api links for the discord bot?
That is, in order for the bot to display random photos of something, for example, cats, on command.
Like this command:
@bot.command()
async def fox(ctx):
response = requests.get(' https://some-random-api.ml/img/fox ') # Get-request
json_data = json.loads(response.text) # Extract the JSON

embed = discord.Embed(color = 0xff9900, title = 'Random Fox') # Create an Embed
embed.set_image(url = json_data['link']) # Set the Embed image 'a
await ctx.send(embed = embed) # Send Embed

The problem is that I can't find a link like this: https://some-random-api.ml/img/fox .
Tell me what to do

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
soremix, 2021-12-14
@UniFild445

And the same service did not please
https://some-random-api.ml/endpoints

V
Vladislav Orlov, 2021-12-14
@haveacess

Cats api
Dogs api
The first links in Google. What is this problem?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question