Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Cool, but playwright doesn’t use your cookies.

Increasingly I want to stop spending time on twitter, but it’s also where the AI news drops first - and I can’t just scrape the data without being logged in.

If there was a way to have the ai go ahead and gather the data for me, that would be great.



This is something I am building. Herd[0] gives you a puppeteer-like API over your own browser, in effect allowing you to use your session seamlessly for automation and data extraction (and avoid bot detection as a nice side effect)

0: https://herd.garden


Playwright can actually use your existing browser cookies if you connect it through Chrome's debugging protocol. Launch Chrome with the flag:

--remote-debugging-port=9222

Then connect via CDP in Playwright like this:

const browser = await chromium.connectOverCDP('http://localhost:9222');


I would agree to this point as well.

Speaking of implementation, i don’t mind if a browser extension forward cookies from my browser to the automation (privacy and security is an issue of course, and i’d ideally want the cookies to not leave my device, but personally i’m okay with some trade off).


Can’t you just have it login?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: