Live data from Hacker News

Playwright: Automate Chromium, WebKit and Firefox

github.com

21–30 of 149 posts

Re: Playwright: Automate Chromium, WebKit and Firefox

#21

What do people thing of playwright vs cypress? I've been considering using playwright instead as it supports more browsers and I feel like it's easier to do production monitoring (by putting it in a aws lambda or using checkly) - Cypress: https://www.cypress.io - Playwright aws lambda: https://github.com/PauloGoncalvesBH/running-playwright-on-aw... - Checkly: https://www.checklyhq.com

Playwright is definitely better IMO. Cypress is overengineered.

I wouldn’t say cypress is over engineered. Just a byproduct of its time.

Re: Playwright: Automate Chromium, WebKit and Firefox

#22

Off-topic, but our freemium website is under attack by headless browsers. The freemium service provides access to compute-heavy machine learning models running on GPUs. Hackers blast 50-100 requests in the same second, which clog the servers and block legitimate users. We reported IPs to AWS and use Cloudflare "Super Bot Fight Mode" to thwart attacks, but the hackers still break through. We don't require accounts, bu…

100 requests/second isn't that much, especially if you're fronting your website with Cloudflare. Do you have some unauthenticated endpoint(s) that eat up a ton of server CPU?

Re: Playwright: Automate Chromium, WebKit and Firefox

#23

Off-topic, but our freemium website is under attack by headless browsers. The freemium service provides access to compute-heavy machine learning models running on GPUs. Hackers blast 50-100 requests in the same second, which clog the servers and block legitimate users. We reported IPs to AWS and use Cloudflare "Super Bot Fight Mode" to thwart attacks, but the hackers still break through. We don't require accounts, bu…

Browser automation will occur by executing events in the DOM or by calling properties of the page/window. It’s all JavaScript designed for user interaction executed by a bot.

The one event that cannot be automated is cursor movement/position. Put a check into your event handlers that check that the cursor is actually over the event target.

Re: Playwright: Automate Chromium, WebKit and Firefox

#25

Off-topic, but our freemium website is under attack by headless browsers. The freemium service provides access to compute-heavy machine learning models running on GPUs. Hackers blast 50-100 requests in the same second, which clog the servers and block legitimate users. We reported IPs to AWS and use Cloudflare "Super Bot Fight Mode" to thwart attacks, but the hackers still break through. We don't require accounts, bu…

Just block the AWS ASN on CF, it's nor worth fighting.

Re: Playwright: Automate Chromium, WebKit and Firefox

#27

Off-topic, but our freemium website is under attack by headless browsers. The freemium service provides access to compute-heavy machine learning models running on GPUs. Hackers blast 50-100 requests in the same second, which clog the servers and block legitimate users. We reported IPs to AWS and use Cloudflare "Super Bot Fight Mode" to thwart attacks, but the hackers still break through. We don't require accounts, bu…

100 requests/second isn't that much, especially if you're fronting your website with Cloudflare. Do you have some unauthenticated endpoint(s) that eat up a ton of server CPU?

Thanks for the reply!

The freemium service provides access to machine learning models on GPU instances, served with FastAPI.

Each request invokes a compute-intensive ML model, but perhaps there is something wrong with the FastAPI configuration as well?

Re: Playwright: Automate Chromium, WebKit and Firefox

#29
post #25

Off-topic, but our freemium website is under attack by headless browsers. The freemium service provides access to compute-heavy machine learning models running on GPUs. Hackers blast 50-100 requests in the same second, which clog the servers and block legitimate users. We reported IPs to AWS and use Cloudflare "Super Bot Fight Mode" to thwart attacks, but the hackers still break through. We don't require accounts, bu…

Just block the AWS ASN on CF, it's nor worth fighting.

+1 and GCP, and many other hosting ASNs

Re: Playwright: Automate Chromium, WebKit and Firefox

#30

Off-topic, but our freemium website is under attack by headless browsers. The freemium service provides access to compute-heavy machine learning models running on GPUs. Hackers blast 50-100 requests in the same second, which clog the servers and block legitimate users. We reported IPs to AWS and use Cloudflare "Super Bot Fight Mode" to thwart attacks, but the hackers still break through. We don't require accounts, bu…

Browser automation will occur by executing events in the DOM or by calling properties of the page/window. It’s all JavaScript designed for user interaction executed by a bot. The one event that cannot be automated is cursor movement/position. Put a check into your event handlers that check that the cursor is actually over the event target.

This is interesting. Thanks for sharing.

Are you saying block form submission unless the cursor is over the event target?

If so:

* How to handle legitimate requests from mobile users?

* How to handle form submissions with the "return" key?

Post reply on HN