Coder Social home page Coder Social logo

scrape-it-with-llm's Introduction

Universal Web Scraping Agent using LLMs

This project demonstrates a universal web scraping agent that uses the Firecrawl framework to scrape data from the web and utilizes a large language model (LLM) to format the data into a JSON response. This project was demonstrated during a peer learning session to illustrate web scraping techniques and data extraction.

Contents

Introduction

The universal web scraping agent is designed to scrape data from any web page using the Firecrawl framework and format the scraped data using a large language model (LLM) provided by Groq. The output is a JSON object containing the structured data extracted from the web page.

Features

Scrapes data from any web page using the Firecrawl framework. Formats the scraped data into a structured JSON object using Groq's LLM. Saves the raw scraped data in markdown format. Saves the formatted data in both JSON and Excel formats.

Installation

To get started with this project, clone the repository and install the required dependencies.

  1. git clone https://github.com/badrinarayanan17/Scrape-It-With-LLM.git

  2. cd Scrape-It-With-LLM

  3. pip install -r requirements.txt

Usage

  1. Create a .env file in the project directory and add your API keys for Firecrawl and Groq.

    FIRECRAWL_API_KEY=your_firecrawl_api_key

    GROQ_API_KEY=your_groq_api_key

  2. Run the script to scrape data from a specified URL and format it.

    python app.py

  3. The raw and formatted data will be saved in the output folder.

Project Structure


Scrape-It-With-LLM/

├── app.py

├── requirements.txt

├── .env

├── output/

│ ├── rawData_.md

│ ├── sorted_data_.json

│ ├── sorted_data_.xlsx

└── README.md

Requirements

  1. firecrawl-py

  2. pandas

  3. openpyxl

  4. py-dotenv

  5. groq

Contributions

Contributions are welcome! Please open an issue or submit a pull request with your changes.

Contact

Name: BadriNarayanan S

Email: [email protected]

LinkedIn: BadriNarayanan S

scrape-it-with-llm's People

Contributors

badrinarayanan17 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.