# 📦 Parsera with Pieces
Fork of Parsera - Lightweight Python library for scraping websites with LLMs, specifically using Pieces QGPT endpoint.
## Why Parsera?
Because it's simple and lightweight, with minimal token use which boosts speed and reduces expenses.
## Installation
```shell
pip install parsera-pieces
playwright install
```
## Basic usage
You can do this from python with:
```python
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())
```
Raw data
{
"_id": null,
"home_page": "https://github.com/pieces-app/parsera-pieces",
"name": "parsera-pieces",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Shivay at Pieces",
"author_email": "shivay@pieces.app",
"download_url": "https://files.pythonhosted.org/packages/74/5b/7d9929bc677dc7f18fc1716a9b43fa3c45bcc4f691e2513948799d6cb44e/parsera-pieces-0.0.6.tar.gz",
"platform": null,
"description": "# \ud83d\udce6 Parsera with Pieces\n\nFork of Parsera - Lightweight Python library for scraping websites with LLMs, specifically using Pieces QGPT endpoint. \n\n## Why Parsera?\nBecause it's simple and lightweight, with minimal token use which boosts speed and reduces expenses.\n\n## Installation\n\n```shell\npip install parsera-pieces\nplaywright install\n```\n\n## Basic usage\n\nYou can do this from python with:\n```python\nfrom parsera_pieces import Parsera\n\nasync def main():\n url = \"https://code.pieces.app/blog\"\n elements = {\n \"Blog Title\": \"Title of the blog\",\n \"Blog Author\": \"Author of the specific blog post\",\n \"Published Date\": \"Date when the project was published\",\n }\n\n scraper = Parsera(None)\n result = await scraper.arun(url=url, elements=elements)\n print(result)\n\nif __name__ == \"__main__\":\n import asyncio\n asyncio.run(main())\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Fork of the original Parsera Lightweight library for scraping web-sites with Pieces QGPT LLM",
"version": "0.0.6",
"project_urls": {
"Homepage": "https://github.com/pieces-app/parsera-pieces"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a8b6c56b1c8f9ab20011b975e2792d26da7c04bad40768f7e0d584921c0eac24",
"md5": "8758b39a7a3ae6153fd022e1dcee8413",
"sha256": "22faa730f5f781aa9f4bb7447afa64aa35058a7c7e8428abecfc8e2b63f4fe74"
},
"downloads": -1,
"filename": "parsera_pieces-0.0.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8758b39a7a3ae6153fd022e1dcee8413",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 12566,
"upload_time": "2024-08-21T14:07:05",
"upload_time_iso_8601": "2024-08-21T14:07:05.313432Z",
"url": "https://files.pythonhosted.org/packages/a8/b6/c56b1c8f9ab20011b975e2792d26da7c04bad40768f7e0d584921c0eac24/parsera_pieces-0.0.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "745b7d9929bc677dc7f18fc1716a9b43fa3c45bcc4f691e2513948799d6cb44e",
"md5": "3eb74902ec5085d68823f33a9f46c5c1",
"sha256": "71ffb5a397bd2db54c9020f6c0b9295a50eb5b09ae6da1e3fe6c297b89f6f61f"
},
"downloads": -1,
"filename": "parsera-pieces-0.0.6.tar.gz",
"has_sig": false,
"md5_digest": "3eb74902ec5085d68823f33a9f46c5c1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 11506,
"upload_time": "2024-08-21T14:07:07",
"upload_time_iso_8601": "2024-08-21T14:07:07.137831Z",
"url": "https://files.pythonhosted.org/packages/74/5b/7d9929bc677dc7f18fc1716a9b43fa3c45bcc4f691e2513948799d6cb44e/parsera-pieces-0.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-21 14:07:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pieces-app",
"github_project": "parsera-pieces",
"github_not_found": true,
"lcname": "parsera-pieces"
}