Firstly I'm very thankful to the author of this scraper. I've searched a lot for Instagram scraper or API for creating a simple gallery for my website and none of them worked on public IPs but this scraper is working great without any issues. I can see a lot of effort you had to put in to make it possible. Thanks a lot for that. Hopefully, I'll try to contribute to this repo in the future.
What's the difference between examples/loginWithSessionId.php and examples/setCustomCookies.php?
Looks like we are doing the same thing for login. (except in setCustomCookies we are just passing a little bit more cookie data). Currently, I'm using setCustomCookies but as loginWithSessionId has been recently added, I'm curious if they have any significant performance differences or which one is better?
I currently use cookies. I am still investigating the new functionality added, mainly in of cronjobs actions.
The first impression I had is that the sessionid you obtain it manually, through the browser console, something that the scraper does not obtain automatically (something that would not work with cronjobs)
I believe that sessionid would be for basic activities like displaying image data and without many requests ...
Already cookies, something more dynamic and with more requests.
I'll post more information as soon as I have it.
@notdest @raiym could give us more information about the new functionality.
I just learned today that setCustomCookies() can be used.
The loginWithSessionId() function was implemented by @fonclub (in MR #824 ), I just wrote an example.
It was implemented hastily, it would be better to do Instagram::withSessionId() instead of Instagram::withCredentials().
Most helpful comment
I just learned today that
setCustomCookies()can be used.The
loginWithSessionId()function was implemented by @fonclub (in MR #824 ), I just wrote an example.It was implemented hastily, it would be better to do
Instagram::withSessionId()instead ofInstagram::withCredentials().