انتقل إلى المحتوى
#0134
Curl

Authenticated scraping without a login loop

The data lives behind a login. You need to log in, fetch fifty pages, then a CSV export. Every request after the login has to carry the right cookies. Most scraping libraries make you wire this by hand: a cookie jar, a session object, a careful request order.

You pass session_id: "vendor-portal" on the login POST. hoody-curl persists the cookies. Every subsequent request with the same session_id sends those cookies automatically. No jar object. No middleware. No re-login when the script crashes: the session sits in /api/v1/curl/sessions/vendor-portal until you delete it.

When the cookie expires next week, you fire the login again with the same session_id. The fifty fetch jobs underneath don't notice.

Auth state is a session id. Everything downstream is a request.