God, Love, News, Event, Entertainment, Amebo,..... All about Bringing out the best in you...
Show HN: Open-source Docker image to run Chrome browsers in your cloud https://ift.tt/YmgLvhZ
Show HN: Open-source Docker image to run Chrome browsers in your cloud If you’ve ever worked with web scraping or automation using Puppeteer or Playwright, you know that running Chrome can be tricky. While headless mode (Chrome with no display) often works, some page elements only render in headed mode, forcing you to run Chrome with a display. This usually means bloating your Dockerfile with complex dependencies like xvfb. Updating your server or Lambda container to handle this can increase costs and lead to dependency hell. The Solution: I’ve built a streamlined solution—a Docker image that runs Chrome with all its necessary dependencies and exposes a FastAPI interface. This decouples the browser logic from your main codebase, letting you focus on scraping or automation without worrying about the underlying setup. The container exposes a WebSocket endpoint at ws://localhost:8000/ws, allowing you to connect Playwright or Puppeteer over Chrome DevTools Protocol (CDP). For example: browser = await pw.chromium.connect_over_cdp('ws://localhost:8000/ws') Each connection to the WebSocket spins up a new Chrome session in headed mode, and you can run multiple sessions concurrently. Unlike other solutions, Finic is fully open-source (Apache 2.0 licensed). You can try it by pulling the official Docker image or cloning the repo at Finic on GitHub ( https://ift.tt/1X9ZGxp ) and running `docker-compose up --build`. This approach simplifies handling Chrome for scraping, saves on cloud costs, and keeps your setup clean. Give it a try! https://ift.tt/T7B2AOC September 27, 2024 at 05:06AM
Subscribe to:
Post Comments (Atom)
Show HN: Tab Sync Pro – Automatically organize browser tabs by domain https://ift.tt/okaebA0
Show HN: Tab Sync Pro – Automatically organize browser tabs by domain Hi HN! I built Tab Sync Pro to solve the common problem of tab overloa...
-
HOMILY FOR FRIDAY, 14TH JUNE, 2024 TENTH WEEK IN ORDINARY TIME 1KING 19:9a. 11-16; GOSPEL: MATT 5:27-32 The conscience of man is where moral...
-
HOMILY FOR TUESDAY, 11TH WEEK IN ORDINARY TIME 1Kings 21:17-29; Matt 5:43-48 The last phrase of the gospel passage says “Be perfect just a...
-
HOMILY FOR MONDAY 24TH WEEK IN ORDINARY TIME B {1COR 12:12-14.27-31a; LUKE 7:11-17} Faith without good works is indeed dead. This theme co...
No comments:
Post a Comment