Question By
Unsolved

Laravel Single Instance over the app

amijaf

Apr 28th, 2021 08:21 AM

Hello everyone, I have an urgent question please.

I am building an app using Laravel, the App will have to access some Instagram data using a scrapper "https://github.com/pgrimaud/instagram-user-feed".

To achieve my goal i will have to login to my account using this package, but i want to avoid multiple login over each request to the scrapper functionalities, what is the best solution to do this?

For now i am going to use a singleton Class which will get an instance from the logged in scrapper, any other suggestions are more than welcome!

Thanks in advance.

bobbyiliev

Apr 29th, 2021 03:39 AM

Hi there,

According to the README.md file the verification is done, then saved to a session automatically.

So you could authenticate once and then use the session to make the requests without authenticating on each request. According to the session is valid for 1 year.

Regards,

Bobby

Report
1