Authentication Cookies via API
Hello everyone! π
I'm developing an application and exploring options to automate access to websites that require login, primarily news sites with paywalls. I'm looking for a hosted solution that enables me to:
Open a browser session via API
Execute code (e.g., Playwright-compatible) to automate the login process
Retrieve the resulting authentication cookies - (This is the important part).
The goal is to reuse these cookies in another service that scrapes the content.
Ideally, I'd like to avoid setting up and maintaining a Node.js or Python-based browser automation service myself.
Does anyone know of products or services that support this kind of workflow? Or anything similar?
2 Replies
I believe I can use it:
https://apify.com/pragmaticcoders/session-login-extractor
Can I a schedule it and get the result of it by API?
Like using it?
https://api.apify.com/v2/actor-tasks/xxx~session-login-extractor-task/runs/last?token=xxx&status=SUCCEEDED
Apify
Session/Login Extractor Β· Apify
Automates login flows and extracts session data.
Supports MFA with TOTP code.
You can use this actor if you need to access website with authentication.
Yeah, you can definitely try out the one mentioned above.
But just a heads-up: since it's a community actor and not maintained by Apify, I'd suggest reaching out to the original developer directly if you run into any issues or need more clarification.
You'll either need to look into third-party services that offer the logic you need.
Another choice is to ask for development help in the #π»hire-freelancers channel. But if you go this route, you'll still be on the hook for maintaining that code, or you'll have to arrange for the developer to do it.