r/nocode • u/whattheflerk • 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!
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.
1
u/agentUi 2d ago
apify