Name | scrapegraphaisub JSON |
Version |
0.0.12b4
JSON |
| download |
home_page | https://github.com/subzero-team/Scrapegraph-ai |
Summary | A first semantic versioned Scrapegraph fork by subzero team |
upload_time | 2024-04-26 13:02:28 |
maintainer | None |
docs_url | None |
author | simone pulcini |
requires_python | !=2.7.*,!=3.0.*,!=3.1.*,!=3.12.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,!=3.8.*,>=3.9 |
license | MIT |
keywords |
scrapegraph
scrapegraphai
langchain
ai
artificial intelligence
gpt
machine learning
rag
nlp
natural language processing
openai
scraping
web scraping
web scraping library
web scraping tool
webscraping
graph
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
1
# 🕷️ ScrapeGraphAI: You Only Scrape Once
[![Downloads](https://static.pepy.tech/badge/scrapegraphai)](https://pepy.tech/project/scrapegraphai)
[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/pylint-dev/pylint)
[![Pylint](https://github.com/VinciGit00/Scrapegraph-ai/actions/workflows/pylint.yml/badge.svg)](https://github.com/VinciGit00/Scrapegraph-ai/actions/workflows/pylint.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
ScrapeGraphAI is a *web scraping* python library based on LangChain which uses LLM and direct graph logic to create scraping pipelines for websites and documents.
Just say which information you want to extract and the library will do it for you!
<p align="center">
<img src="https://raw.githubusercontent.com/VinciGit00/Scrapegraph-ai/main/docs/assets/scrapegraphai_logo.png" alt="Scrapegraph-ai Logo" style="width: 50%;">
</p>
## 🚀 Quick install
The reference page for Scrapegraph-ai is avaible on the official page of pypy: [pypi](https://pypi.org/project/scrapegraphai/).
```bash
pip install scrapegraphai
```
## 🔍 Demo
Official streamlit demo:
[![My Skills](https://skillicons.dev/icons?i=react)](https://scrapegraph-ai-demo.streamlit.app/)
Try it directly on the web using Google Colab:
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1sEZBonBMGP44CtO6GQTwAlL0BGJXjtfd?usp=sharing)
Follow the procedure on the following link to setup your OpenAI API key: [link](https://scrapegraph-ai.readthedocs.io/en/latest/index.html).
## 📖 Documentation
The documentation for ScrapeGraphAI can be found [here](https://scrapegraph-ai.readthedocs.io/en/latest/).
Check out also the docusaurus [documentation](https://scrapegraph-doc.onrender.com/).
## 💻 Usage
### Case 1: Extracting information using a prompt
You can use the `SmartScraper` class to extract information from a website using a prompt.
The `SmartScraper` class is a direct graph implementation that uses the most common nodes present in a web scraping pipeline. For more information, please see the [documentation](https://scrapegraph-ai.readthedocs.io/en/latest/).
```python
import os
from dotenv import load_dotenv
from scrapegraphai.graphs import SmartScraperGraph
load_dotenv()
openai_key = os.getenv("OPENAI_APIKEY")
# Define the configuration for the graph
graph_config = {
"llm": {
"api_key": openai_key,
"model": "gpt-3.5-turbo",
},
}
# Create the SmartScraperGraph instance
smart_scraper_graph = SmartScraperGraph(
prompt="List me all the titles and project descriptions"
file_source="https://perinim.github.io/projects/", # also accepts a local file path
config=graph_config
)
result = smart_scraper_graph.run()
print(result)
```
The output will be a dictionary with the extracted information, for example:
```bash
{
'titles': [
'Rotary Pendulum RL'
],
'descriptions': [
'Open Source project aimed at controlling a real life rotary pendulum using RL algorithms'
]
}
```
## 🤝 Contributing
Fell free to contribute and join our Discord server to discuss with us improvements and give us suggestions!
For more information, please see the [contributing guidelines](https://github.com/VinciGit00/Scrapegraph-ai/blob/main/CONTRIBUTING.md).
[![My Skills](https://skillicons.dev/icons?i=discord)](https://discord.gg/DujC7HG8)
[![My Skills](https://skillicons.dev/icons?i=linkedin)](https://www.linkedin.com/company/scrapegraphai/)
## ❤️ Contributors
[![Contributors](https://contrib.rocks/image?repo=VinciGit00/Scrapegraph-ai)](https://github.com/VinciGit00/Scrapegraph-ai/graphs/contributors)
## 🎓 Citations
If you have used our library for research purposes please quote us with the following reference:
```text
@misc{scrapegraph-ai,
author = {Marco Perini, Lorenzo Padoan, Marco Vinciguerra},
title = {Scrapegraph-ai},
year = {2024},
url = {https://github.com/VinciGit00/Scrapegraph-ai},
note = {A Python library for scraping data from graphs}
}
```
## Authors
<p align="center">
<img src="https://raw.githubusercontent.com/VinciGit00/Scrapegraph-ai/main/docs/assets/logo_authors.png" alt="Authors Logos">
</p>
| | Contact Info |
|--------------------|----------------------|
| Marco Vinciguerra | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/marco-vinciguerra-7ba365242/) |
| Marco Perini | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/perinim/) |
| Lorenzo Padoan | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/lorenzo-padoan-4521a2154/) |
## 📜 License
ScrapeGraphAI is licensed under the MIT License. See the [LICENSE](https://github.com/VinciGit00/Scrapegraph-ai/blob/main/LICENSE) file for more information.
## Acknowledgements
- We would like to thank all the contributors to the project and the open-source community for their support.
- ScrapeGraphAI is meant to be used for data exploration and research purposes only. We are not responsible for any misuse of the library.
Raw data
{
"_id": null,
"home_page": "https://github.com/subzero-team/Scrapegraph-ai",
"name": "scrapegraphaisub",
"maintainer": null,
"docs_url": null,
"requires_python": "!=2.7.*,!=3.0.*,!=3.1.*,!=3.12.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,!=3.8.*,>=3.9",
"maintainer_email": null,
"keywords": "scrapegraph, scrapegraphai, langchain, ai, artificial intelligence, gpt, machine learning, rag, nlp, natural language processing, openai, scraping, web scraping, web scraping library, web scraping tool, webscraping, graph",
"author": "simone pulcini",
"author_email": "pulcini@prova.prova",
"download_url": "https://files.pythonhosted.org/packages/db/2d/4225f692877fc8fe3b633b376ac8e9ea32c6f7a4f5947bd5421185d3e6e1/scrapegraphaisub-0.0.12b4.tar.gz",
"platform": null,
"description": "1\n\n\n# \ud83d\udd77\ufe0f ScrapeGraphAI: You Only Scrape Once\n[![Downloads](https://static.pepy.tech/badge/scrapegraphai)](https://pepy.tech/project/scrapegraphai)\n[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/pylint-dev/pylint)\n[![Pylint](https://github.com/VinciGit00/Scrapegraph-ai/actions/workflows/pylint.yml/badge.svg)](https://github.com/VinciGit00/Scrapegraph-ai/actions/workflows/pylint.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n\nScrapeGraphAI is a *web scraping* python library based on LangChain which uses LLM and direct graph logic to create scraping pipelines for websites and documents.\nJust say which information you want to extract and the library will do it for you!\n\n<p align=\"center\">\n <img src=\"https://raw.githubusercontent.com/VinciGit00/Scrapegraph-ai/main/docs/assets/scrapegraphai_logo.png\" alt=\"Scrapegraph-ai Logo\" style=\"width: 50%;\">\n</p>\n\n\n## \ud83d\ude80 Quick install\n\nThe reference page for Scrapegraph-ai is avaible on the official page of pypy: [pypi](https://pypi.org/project/scrapegraphai/).\n\n```bash\npip install scrapegraphai\n```\n## \ud83d\udd0d Demo\nOfficial streamlit demo:\n\n[![My Skills](https://skillicons.dev/icons?i=react)](https://scrapegraph-ai-demo.streamlit.app/)\n\nTry it directly on the web using Google Colab:\n\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1sEZBonBMGP44CtO6GQTwAlL0BGJXjtfd?usp=sharing)\n\nFollow the procedure on the following link to setup your OpenAI API key: [link](https://scrapegraph-ai.readthedocs.io/en/latest/index.html).\n\n## \ud83d\udcd6 Documentation\n\nThe documentation for ScrapeGraphAI can be found [here](https://scrapegraph-ai.readthedocs.io/en/latest/).\n\nCheck out also the docusaurus [documentation](https://scrapegraph-doc.onrender.com/).\n\n## \ud83d\udcbb Usage\n\n### Case 1: Extracting information using a prompt\n\nYou can use the `SmartScraper` class to extract information from a website using a prompt.\n\nThe `SmartScraper` class is a direct graph implementation that uses the most common nodes present in a web scraping pipeline. For more information, please see the [documentation](https://scrapegraph-ai.readthedocs.io/en/latest/).\n\n```python\nimport os\nfrom dotenv import load_dotenv\nfrom scrapegraphai.graphs import SmartScraperGraph\n\nload_dotenv()\nopenai_key = os.getenv(\"OPENAI_APIKEY\")\n\n# Define the configuration for the graph\ngraph_config = {\n \"llm\": {\n \"api_key\": openai_key,\n \"model\": \"gpt-3.5-turbo\",\n },\n}\n\n# Create the SmartScraperGraph instance\nsmart_scraper_graph = SmartScraperGraph(\n prompt=\"List me all the titles and project descriptions\"\n file_source=\"https://perinim.github.io/projects/\", # also accepts a local file path\n config=graph_config\n)\n\nresult = smart_scraper_graph.run()\nprint(result)\n\n```\n\nThe output will be a dictionary with the extracted information, for example:\n\n```bash\n{\n 'titles': [\n 'Rotary Pendulum RL'\n ],\n 'descriptions': [\n 'Open Source project aimed at controlling a real life rotary pendulum using RL algorithms'\n ]\n}\n```\n\n## \ud83e\udd1d Contributing\n\nFell free to contribute and join our Discord server to discuss with us improvements and give us suggestions!\n\nFor more information, please see the [contributing guidelines](https://github.com/VinciGit00/Scrapegraph-ai/blob/main/CONTRIBUTING.md).\n\n[![My Skills](https://skillicons.dev/icons?i=discord)](https://discord.gg/DujC7HG8)\n[![My Skills](https://skillicons.dev/icons?i=linkedin)](https://www.linkedin.com/company/scrapegraphai/)\n\n## \u2764\ufe0f Contributors\n[![Contributors](https://contrib.rocks/image?repo=VinciGit00/Scrapegraph-ai)](https://github.com/VinciGit00/Scrapegraph-ai/graphs/contributors)\n\n## \ud83c\udf93 Citations\nIf you have used our library for research purposes please quote us with the following reference:\n```text\n @misc{scrapegraph-ai,\n author = {Marco Perini, Lorenzo Padoan, Marco Vinciguerra},\n title = {Scrapegraph-ai},\n year = {2024},\n url = {https://github.com/VinciGit00/Scrapegraph-ai},\n note = {A Python library for scraping data from graphs}\n }\n```\n\n## Authors\n\n<p align=\"center\">\n <img src=\"https://raw.githubusercontent.com/VinciGit00/Scrapegraph-ai/main/docs/assets/logo_authors.png\" alt=\"Authors Logos\">\n</p>\n\n| | Contact Info |\n|--------------------|----------------------|\n| Marco Vinciguerra | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/marco-vinciguerra-7ba365242/) |\n| Marco Perini | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/perinim/) |\n| Lorenzo Padoan | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/lorenzo-padoan-4521a2154/) |\n\n## \ud83d\udcdc License\n\nScrapeGraphAI is licensed under the MIT License. See the [LICENSE](https://github.com/VinciGit00/Scrapegraph-ai/blob/main/LICENSE) file for more information.\n\n## Acknowledgements\n\n- We would like to thank all the contributors to the project and the open-source community for their support.\n- ScrapeGraphAI is meant to be used for data exploration and research purposes only. We are not responsible for any misuse of the library.\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A first semantic versioned Scrapegraph fork by subzero team",
"version": "0.0.12b4",
"project_urls": {
"Documentation": "https://github.com/subzero-team/Scrapegraph-ai",
"Homepage": "https://github.com/subzero-team/Scrapegraph-ai",
"Repository": "https://github.com/subzero-team/Scrapegraph-ai"
},
"split_keywords": [
"scrapegraph",
" scrapegraphai",
" langchain",
" ai",
" artificial intelligence",
" gpt",
" machine learning",
" rag",
" nlp",
" natural language processing",
" openai",
" scraping",
" web scraping",
" web scraping library",
" web scraping tool",
" webscraping",
" graph"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "393fa95591745dc2650d1f0c8b1f1efd70e5ddaceae11edbe7ff76e1b0532ad3",
"md5": "6dca493970099510247eb535f74068d8",
"sha256": "bc1949a33dc90f5aa7def7c3c32420c053d50f564cfc08d04a08ef2a6272f58a"
},
"downloads": -1,
"filename": "scrapegraphaisub-0.0.12b4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6dca493970099510247eb535f74068d8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "!=2.7.*,!=3.0.*,!=3.1.*,!=3.12.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,!=3.8.*,>=3.9",
"size": 38391,
"upload_time": "2024-04-26T13:02:26",
"upload_time_iso_8601": "2024-04-26T13:02:26.306075Z",
"url": "https://files.pythonhosted.org/packages/39/3f/a95591745dc2650d1f0c8b1f1efd70e5ddaceae11edbe7ff76e1b0532ad3/scrapegraphaisub-0.0.12b4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "db2d4225f692877fc8fe3b633b376ac8e9ea32c6f7a4f5947bd5421185d3e6e1",
"md5": "91f6623e04dd9e6da36e86d42a0561d4",
"sha256": "a7af1cd1d58398ef6afcc582760a22f1d5240b0623cdfabc570555cc7bde4a95"
},
"downloads": -1,
"filename": "scrapegraphaisub-0.0.12b4.tar.gz",
"has_sig": false,
"md5_digest": "91f6623e04dd9e6da36e86d42a0561d4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "!=2.7.*,!=3.0.*,!=3.1.*,!=3.12.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,!=3.8.*,>=3.9",
"size": 24961,
"upload_time": "2024-04-26T13:02:28",
"upload_time_iso_8601": "2024-04-26T13:02:28.398976Z",
"url": "https://files.pythonhosted.org/packages/db/2d/4225f692877fc8fe3b633b376ac8e9ea32c6f7a4f5947bd5421185d3e6e1/scrapegraphaisub-0.0.12b4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-26 13:02:28",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "subzero-team",
"github_project": "Scrapegraph-ai",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "scrapegraphaisub"
}