Closed belqit closed 2 years ago
Hi. Can you try to set your own Bio (profile) on your account, to something. see if that helps
already did it.
it fails here:
that api is not called
Hmm. yes. I can reproduce the problem. also the Bio fix did not work for me etiher. For some reason instagram doesn't send this request when running in puppeteer. When opening the page on my normal chrome (same user), it works.
I tried:
Not sure why it's not sending that request...
this is my fix
async function navigateToUserAndGetData(username) {
const cachedUserData = userDataCache[username];
if (isAlreadyOnUserPage(username)) {
// assume we have data
return cachedUserData;
}
if (cachedUserData != null) {
// if we already have userData, just navigate
await navigateToUserWithCheck(username);
return cachedUserData;
}
await navigateToUserWithCheck(username);
var body = await page.content()
const r = body.split(/\r?\n/);
var userData;
for (var q of r) {
if (q.includes("edge_followed_by")) {
q = q.split(",[],[")[1]
q = q.split("]]]")[0]
q = JSON.parse(q)
q = q.data.__bbox.result.response
q = q.replace(/\\/g, "");
q = JSON.parse(q);
userData = q.data.user
break;
}
}
userDataCache[username] = userData;
return userData;
}
not sure how that works. I cannot find edge_followed_by
in my html
I have it.
Did you check on your profile page html?
yes. instagram.com/myaccount are you using mobile or desktop User agent?
Desktop, I didn't change my user agent
Il ven 29 lug 2022, 18:14 Mikael Finstad @.***> ha scritto:
yes. instagram.com/myaccount are you using mobile or desktop User agent?
— Reply to this email directly, view it on GitHub https://github.com/mifi/instauto/issues/115#issuecomment-1199646163, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKRQPHPWH6BWZQTRCCCLK4TVWP7MPANCNFSM55AIOO2A . You are receiving this because you authored the thread.Message ID: @.***>
I have two accounts. One works with instauto and the other one gets Timeout. (doesn't sent the web_profile_info
request). I did notice a difference:
<script>qpl_inl("...","tierTwo");</script>
<script>qpl_inl("...","tierThree");</script>
so I'm thinking instagram gives different users different versions of the frontend code. and the new version no longer sends the web_profile_info request
i have tierOne
,tierTwo
and tierThree
.
the edge_followed_by
part is between tierTwo
and tierThree
, it starts with requireLazy(["JSScheduler","ServerJS","ScheduledApplyEach"],function(JSSch...
I tried your JS and it seems to work on our own profile, but when navigating to other accounts, the edge_followed_by
doesn't seem to exist in the HTML. did you find any workaround for that?
for me is working on others profile page too, every profile page have a different json.
I have combined your solution with some other workarounds, and that seems to work. releasing a new version.
the bot crashes on startup, it says that it can't reach my ig page, but i can see my ig page on google chrome
instauto 9.1.9