我一直在网络上忙于寻找答案,但由于弃用的解决方案,我似乎一直处于死胡同。我正在尝试通过HTML和JavaScript制作我自己的完整instagram DP工具,但是使用该API我只能设法获得320px,但是有些网站仍然提供1080px,无法弄清楚他们如何进行管理。这是我当前的JavaScript函数:
window.onload = function getUsername() {
var username = prompt('Enter Instagram Username:');
fetch(`https://www.instagram.com/` + username + `/?__a=1`)
.then(function(response) {
return response.json();
})
.then(function(json) {
var picture = json.graphql.user.profile_pic_url_hd;
document.getElementById('dp').innerHTML = '<img src="' + picture + '">';
});
}
任何帮助将不胜感激,谢谢!