我需要从instagram帖子链接中抓取图像和视频(例如:https://www.instagram.com/p/BZiTZWXABMp)。
当使用python的普通请求时,我没有在html响应中接收图像url。请帮助我。

最佳答案

您可以检查以下网址:https://api.instagram.com/oembed/?url=<your-url>返回一个json,您可以获取其thumbnail_url属性

在您请求的帖子中,要查询的网址是:https://api.instagram.com/oembed/?url=https://www.instagram.com/p/BZiTZWXABMp/
在那里,您可以获取图片网址:https://instagram.fmad3-4.fna.fbcdn.net/t51.2885-15/s480x480/e35/21984643_995308220608235_7854693412774084608_n.jpg

07-28 02:47
查看更多