Skip to content

shivaypiece/parsera-pieces

Repository files navigation

📦 Parsera with Pieces

Screen.Recording.2024-08-21.at.8.24.28.PM.mov

Fork of Parsera - Lightweight Python library for scraping websites with LLMs, specifically using Pieces QGPT endpoint.

Why Parsera with Pieces?

Because it's simple and lightweight, with minimal token use which boosts speed and reduces expenses.

Installation

pip install parsera-pieces
playwright install

Basic usage

You can do this from python with:

from parsera_pieces import Parsera

async def main():
       url = "https://code.pieces.app/blog"
       elements = {
           "Blog Title": "Title of the blog",
           "Blog Author": "Author of the specific blog post",
           "Published Date": "Date when the project was published",
       }

       scraper = Parsera(None)
       result = await scraper.arun(url=url, elements=elements)
       print(result)

if __name__ == "__main__":
       import asyncio
       asyncio.run(main())

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages