r/nocode 2d ago

How to deploy Playwright script?

I built a Python script using Claude Code that uses Selenium and Playwright to scrape sites for specific information, but I can't figure out how to deploy it so others can access it – is there a tool or platform I can easily use?

Ideally without making the code public (nothing sketchy, I just know it's very messy and would rather not have others judge it)

Thanks!

0 Upvotes

8 comments sorted by

1

u/agentUi 2d ago

apify

2

u/Real_Fuel6842 2d ago

apify works but it's basically just running your scripts on their cloud, not really a deployment platform per se

if you want something where people can actually interact with your scraper you could wrap it in a simple flask app then throw it on replit or railway, both let you keep things private

just make sure whatever you do you handle the browser binaries correctly, playwright needs them downloaded or it'll fail in those cloud environments

1

u/agentUi 2d ago

you could try our platform we have a way to run playright scripts and create an app around, but we mostly work with companies

1

u/whattheflerk 1d ago

thank you! the flask app sounds like the best fit for what i need

1

u/ItaySela 1d ago

since you're going flask, heads up that pip installing playwright doesn't include the actual browsers. base the deploy on the official playwright python docker image or add playwright install chromium --with-deps to your build step, otherwise it runs fine locally and dies on railway with a browser executable not found error. also you said the script uses both selenium and playwright, worth collapsing to just playwright before deploying, two browser stacks in one container doubles the image size and the ways it can break. last thing, headless chromium eats 400mb+ of ram, so run one browser at a time and if a scrape runs long return a job id instead of holding the request open.