Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logged-in crawls #73

Open
pooneh-nb opened this issue Aug 19, 2022 · 1 comment
Open

logged-in crawls #73

pooneh-nb opened this issue Aug 19, 2022 · 1 comment

Comments

@pooneh-nb
Copy link

Hi there,
I'm wondering if "logged-in crawls" can be done using TrackerRadar. The crawler needs to preserve logged-in status to Facebook/Google.

@kdzwinel
Copy link
Member

kdzwinel commented Sep 14, 2022

Hey @pooneh-nb ! Sorry for a late response. crawlerConductor can't currently do it, but a single crawler can. You have to create one non-incognito context and reuse it via browserContext param to crawl multiple sites. Sth like this:

const browser = /*create browser*/
const loggedInContext = browser.defaultBrowserContext();

// data between crawls will not be cleared
const data1 = await crawler(new URL('https://example.com'), {browserContext: loggedInContext});
const data2 = await crawler(new URL('https://example.com'), {browserContext: loggedInContext});

LMK if you have any follow up questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants