Project Introduction: Finic
Finic is an innovative tool tailored for developers who work extensively with web scrapers, browser automations, and AI agents, particularly those coding in Python. This project provides seamless browser infrastructure, essentially offering a browser in the cloud that you can control remotely. This control is enabled through the use of popular automation libraries like Playwright and Puppeteer, with some additional setup for Selenium.
Key Features
-
Stealth Browsers: Finic offers a variety of stealth browsers ready at your fingertips. These browsers help developers execute web scraping and automations without the risk of being detected or blocked by websites.
-
Unopinionated Design: The project is designed to be flexible and adaptable. Finic does not impose rigid methodologies or structures for development, allowing developers to integrate it into their existing workflows seamlessly. It provides network-level utilities to ensure that automated tasks run smoothly without interruptions.
-
Cloud-Based Browsers: As a cloud-based solution, Finic allows developers to manage and operate browsers remotely. This is particularly beneficial for those who need to scale their operations or run automated tasks from different locations or servers.
Getting Started
To start using Finic, developers can quickly clone the project's repository using Git:
git clone https://github.com/finic-ai/finic.git
Running Locally
Finic can run like any standard Docker container. Here’s how you can launch it locally:
sudo docker-compose up --build
Once the Docker container is up and running, you can connect to it with a sample Python script:
CDP_URL = "ws://localhost:8000/ws"
async def main():
print("Connecting to Browser...")
async with async_playwright() as pw:
browser = await pw.chromium.connect_over_cdp(CDP_URL)
try:
print("Connected! Navigating...")
page = await browser.new_page()
await page.goto("https://example.com", timeout=2 * 60 * 1000)
print("Navigated! Scraping page content...")
html = await page.content()
print(html)
finally:
await browser.close()
asyncio.run(main())
Alternatively, you can test the container by running:
python testscript.py
Integration with Existing Projects
For those who wish to integrate Finic with an existing project, the transition is straightforward. Simply replace the standard browser launch line in your Playwright code:
browser = playwright.chromium.launch(headless=False)
With the Finic connection method:
browser = playwright.chromium.connect_over_cdp("ws://localhost:8080/ws")
Community and Support
Finic benefits from being backed by Y Combinator, ensuring robust support and a growing community. For documentation, more insights, or any queries, you can access various resources:
- The documentation provides comprehensive guides and details.
- Join their Discord community for support, discussions, and updates.
In summary, Finic stands out as a versatile and robust tool for developers in web automation and scraping landscapes, providing a stealthy, cloud-based browser framework that complements a wide array of automation libraries.