Question
How do I know when an automated login has expired?
Watch for the three things a site does when it ends a session: it sends the browser to a sign-in page, it shows a password field, or it deletes the authentication cookie. Check for them during every run, because an expired login usually does not fail loudly — it returns signed-out pages that look like empty results.
Last updated
The signs to check
A site ending a session does at least one of these. Any one is enough to stop the run and ask for a fresh sign-in.
- The URL path is a sign-in path such as /login or /signin.
- A visible password field appears on a site you were signed in to.
- A cookie the login depended on has been removed.
Don't overwrite a good login with a bad one
If your code saves the session at the end of each run, a run that was signed out will save the sign-in page's cookies over the working login. Refuse to save when any of the signs above are present.
With Scrappy
A session started from a saved login is checked every minute. When the site ends the login, you get one BROWSER_LOGIN_LOST webhook naming the session, the saved login, the site and which sign it saw — sign_in_path, password_form or auth_cookie_removed. Automatic saves also refuse to write a signed-out session over a working login.
Questions
- Can I try it before paying?
- Yes. A new account gets 100 credits, enough for a few sessions of real use. A session costs 5 credits to start and 1 per minute after that.
Start
Try it on the site you need this week. The first 100 credits are free.
Enough for ten scrapes or a first hour in the cloud browser. No card, no call, no minimum.