Answer the question
In order to leave comments, you need to log in
I wrote a python code for the Discord bot so that it would throw pictures, I can’t understand what the problem is either in the site or in the code itself?
@bot.command()
async def anime(ctx):
response = requests.get("https://www.pixiv.net/en/")
json_data = json.loads(response.text)
embed = discord.Embed(color =0xff9900, title = 'Anime')
embed.set_image(url = json_data["link"])
await ctx.send(embed = embed)
Answer the question
In order to leave comments, you need to log in
And you are a sly one!)
We do this:
import requests
response = requests.get('https://www.pixiv.net/en/')
print(response.text)
import requests
response = requests.get('https://www.pixiv.net/en/')
with open('1.html','w') as file:
file.write(response.text)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question