Skip to content

Python scraper based on AI

changed name

VinciGit00276ac8b40cf7
diff --git a/examples/gemini/csv_scraper_gemini.py b/examples/gemini/csv_scraper_gemini.py
index 2aa004c2..c19419b0 100644
--- a/examples/gemini/csv_scraper_gemini.py
+++ b/examples/gemini/csv_scraper_gemini.py
@@ -1,11 +1,11 @@
"""
-Basic example of scraping pipeline using CsvScraperGraph from CSV documents
+Basic example of scraping pipeline using CSVScraperGraph from CSV documents
"""
import os
from dotenv import load_dotenv
import pandas as pd
-from scrapegraphai.graphs import CsvScraperGraph
+from scrapegraphai.graphs import CSVScraperGraph
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info
load_dotenv()
@@ -36,10 +36,10 @@ graph_config = {
}
# ************************************************
-# Create the CsvScraperGraph instance and run it
+# Create the CSVScraperGraph instance and run it
# ************************************************
-csv_scraper_graph = CsvScraperGraph(
+csv_scraper_graph = CSVScraperGraph(
prompt="List me all the last names",
source=str(text), # Pass the content of the file, not the file object
config=graph_config
diff --git a/examples/local_models/Docker/csv_scraper_docker.py b/examples/local_models/Docker/csv_scraper_docker.py
index 8cd52723..51e96b17 100644
--- a/examples/local_models/Docker/csv_scraper_docker.py
+++ b/examples/local_models/Docker/csv_scraper_docker.py
@@ -1,9 +1,9 @@
"""
-Basic example of scraping pipeline using CsvScraperGraph from CSV documents
+Basic example of scraping pipeline using CSVScraperGraph from CSV documents
"""
import pandas as pd
-from scrapegraphai.graphs import CsvScraperGraph
+from scrapegraphai.graphs import CSVScraperGraph
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info
# ************************************************
@@ -30,10 +30,10 @@ graph_config = {
}
# ************************************************
-# Create the CsvScraperGraph instance and run it
+# Create the CSVScraperGraph instance and run it
# ************************************************
-csv_scraper_graph = CsvScraperGraph(
+csv_scraper_graph = CSVScraperGraph(
prompt="List me all the last names",
source=str(text), # Pass the content of the file, not the file object
config=graph_config
diff --git a/examples/local_models/Ollama/csv_scraper_ollama.py b/examples/local_models/Ollama/csv_scraper_ollama.py
index c5e5ce35..c81d963b 100644
--- a/examples/local_models/Ollama/csv_scraper_ollama.py
+++ b/examples/local_models/Ollama/csv_scraper_ollama.py
@@ -1,9 +1,9 @@
"""
-Basic example of scraping pipeline using CsvScraperGraph from CSV documents
+Basic example of scraping pipeline using CSVScraperGraph from CSV documents
"""
import pandas as pd
-from scrapegraphai.graphs import CsvScraperGraph
+from scrapegraphai.graphs import CSVScraperGraph
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info
# ************************************************
@@ -32,10 +32,10 @@ graph_config = {
}
# ************************************************
-# Create the CsvScraperGraph instance and run it
+# Create the CSVScraperGraph instance and run it
# ************************************************
-csv_scraper_graph = CsvScraperGraph(
+csv_scraper_graph = CSVScraperGraph(
prompt="List me all the last names",
source=str(text), # Pass the content of the file, not the file object
config=graph_config
diff --git a/examples/openai/csv_scraper_openai.py b/examples/openai/csv_scraper_openai.py
index aec40fe2..0ee98f15 100644
--- a/examples/openai/csv_scraper_openai.py
+++ b/examples/openai/csv_scraper_openai.py
@@ -1,11 +1,11 @@
"""
-Basic example of scraping pipeline using CsvScraperGraph from CSV documents
+Basic example of scraping pipeline using CSVScraperGraph from CSV documents
"""
import os
from dotenv import load_dotenv
import pandas as pd
-from scrapegraphai.graphs import CsvScraperGraph
+from scrapegraphai.graphs import CSVScraperGraph
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info
load_dotenv()
@@ -29,10 +29,10 @@ graph_config = {
}
# ************************************************
-# Create the CsvScraperGraph instance and run it
+# Create the CSVScraperGraph instance and run it
# ************************************************
-csv_scraper_graph = CsvScraperGraph(
+csv_scraper_graph = CSVScraperGraph(
prompt="List me all the last names",
source=str(text), # Pass the content of the file, not the file object
config=graph_config
diff --git a/scrapegraphai/graphs/__init__.py b/scrapegraphai/graphs/__init__.py
index 8a5fda63..25a29ac7 100644
--- a/scrapegraphai/graphs/__init__.py
+++ b/scrapegraphai/graphs/__init__.py
@@ -8,4 +8,4 @@ from .search_graph import SearchGraph
from .script_creator_graph import ScriptCreatorGraph
from .xml_scraper_graph import XMLScraperGraph
from .json_scraper_graph import JSONScraperGraph
-from .csv_scraper_graph import CsvScraperGraph
+from .csv_scraper_graph import CSVScraperGraph
diff --git a/scrapegraphai/graphs/csv_scraper_graph.py b/scrapegraphai/graphs/csv_scraper_graph.py
index 2217af5b..9ae3e605 100644
--- a/scrapegraphai/graphs/csv_scraper_graph.py
+++ b/scrapegraphai/graphs/csv_scraper_graph.py
@@ -11,7 +11,7 @@ from ..nodes import (
from .abstract_graph import AbstractGraph
-class CsvScraperGraph(AbstractGraph):
+class CSVScraperGraph(AbstractGraph):
"""
SmartScraper is a comprehensive web scraping tool that automates the process of extracting
information from web pages using a natural language model to interpret and answer prompts.
@@ -19,7 +19,7 @@ class CsvScraperGraph(AbstractGraph):
def __init__(self, prompt: str, source: str, config: dict):
"""
- Initializes the csvScraperGraph with a prompt, source, and configuration.
+ Initializes the CSVScraperGraph with a prompt, source, and configuration.
"""
super().__init__(prompt, config, source)