Python scraper based on AI
Python ai-crawlerai-scrapingai-searchcrawlerdata-extractionfirecrawl-alternativelarge-language-modelllmmarkdownragscrapingscraping-pythonweb-crawlerweb-crawlersweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
feat: updated pydantic to v2
Lorenzo Palearieb8954924811
diff --git a/examples/anthropic/search_graph_schema_haiku.py b/examples/anthropic/search_graph_schema_haiku.pyindex 0ccafa79..1158d58a 100644--- a/examples/anthropic/search_graph_schema_haiku.py+++ b/examples/anthropic/search_graph_schema_haiku.py@@ -5,7 +5,7 @@ Example of Search Graphimport osfrom typing import Listfrom dotenv import load_dotenv-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom scrapegraphai.graphs import SearchGraphload_dotenv()diff --git a/examples/anthropic/smart_scraper_schema_haiku.py b/examples/anthropic/smart_scraper_schema_haiku.pyindex 0e70aeb5..bd447a06 100644--- a/examples/anthropic/smart_scraper_schema_haiku.py+++ b/examples/anthropic/smart_scraper_schema_haiku.py@@ -4,7 +4,7 @@ Basic example of scraping pipeline using SmartScraper using Azure OpenAI Keyimport osfrom typing import List-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom dotenv import load_dotenvfrom scrapegraphai.graphs import SmartScraperGraphfrom scrapegraphai.utils import prettify_exec_infodiff --git a/examples/azure/search_graph_schema_azure.py b/examples/azure/search_graph_schema_azure.pyindex ba80b373..629c92ab 100644--- a/examples/azure/search_graph_schema_azure.py+++ b/examples/azure/search_graph_schema_azure.py@@ -9,7 +9,7 @@ load_dotenv()from scrapegraphai.graphs import SearchGraphfrom scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom typing import List# ************************************************diff --git a/examples/azure/smart_scraper_schema_azure.py b/examples/azure/smart_scraper_schema_azure.pyindex 5c882c46..d0816bf5 100644--- a/examples/azure/smart_scraper_schema_azure.py+++ b/examples/azure/smart_scraper_schema_azure.py@@ -5,7 +5,7 @@ Basic example of scraping pipeline using SmartScraper with schemaimport osimport jsonfrom typing import List-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom dotenv import load_dotenvfrom scrapegraphai.graphs import SmartScraperGraphdiff --git a/examples/bedrock/search_graph_schema_bedrock.py b/examples/bedrock/search_graph_schema_bedrock.pyindex ad2cadab..a49ba730 100644--- a/examples/bedrock/search_graph_schema_bedrock.py+++ b/examples/bedrock/search_graph_schema_bedrock.py@@ -4,7 +4,7 @@ Example of Search Graphfrom scrapegraphai.graphs import SearchGraphfrom scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom typing import List# ************************************************diff --git a/examples/bedrock/smart_scraper_schema_bedrock.py b/examples/bedrock/smart_scraper_schema_bedrock.pyindex 02f83029..2829efec 100644--- a/examples/bedrock/smart_scraper_schema_bedrock.py+++ b/examples/bedrock/smart_scraper_schema_bedrock.py@@ -2,7 +2,7 @@Basic example of scraping pipeline using SmartScraper"""from typing import List-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom scrapegraphai.graphs import SmartScraperGraphfrom scrapegraphai.utils import prettify_exec_infodiff --git a/examples/deepseek/search_graph_schema_deepseek.py b/examples/deepseek/search_graph_schema_deepseek.pyindex 9966602d..1471ede1 100644--- a/examples/deepseek/search_graph_schema_deepseek.py+++ b/examples/deepseek/search_graph_schema_deepseek.py@@ -9,7 +9,7 @@ load_dotenv()from scrapegraphai.graphs import SearchGraphfrom scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom typing import List# ************************************************diff --git a/examples/deepseek/smart_scraper_schema_deepseek.py b/examples/deepseek/smart_scraper_schema_deepseek.pyindex 6d924b71..722e02bf 100644--- a/examples/deepseek/smart_scraper_schema_deepseek.py+++ b/examples/deepseek/smart_scraper_schema_deepseek.py@@ -4,7 +4,7 @@ Basic example of scraping pipeline using SmartScraperimport osfrom typing import List-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom dotenv import load_dotenvfrom scrapegraphai.graphs import SmartScraperGraphfrom scrapegraphai.utils import prettify_exec_infodiff --git a/examples/extras/serch_graph_scehma.py b/examples/extras/serch_graph_scehma.pyindex f4135d19..66c47a33 100644--- a/examples/extras/serch_graph_scehma.py+++ b/examples/extras/serch_graph_scehma.py@@ -5,7 +5,7 @@ Example of Search Graphimport osfrom dotenv import load_dotenvfrom scrapegraphai.graphs import SearchGraph-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom typing import Listload_dotenv()diff --git a/examples/fireworks/pdf_scraper_multi_fireworks.py b/examples/fireworks/pdf_scraper_multi_fireworks.pyindex bbf3808a..c1077061 100644--- a/examples/fireworks/pdf_scraper_multi_fireworks.py+++ b/examples/fireworks/pdf_scraper_multi_fireworks.py@@ -5,7 +5,7 @@ import osimport jsonfrom typing import Listfrom dotenv import load_dotenv-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom scrapegraphai.graphs import PdfScraperMultiGraphload_dotenv()diff --git a/examples/fireworks/script_generator_schema_fireworks.py b/examples/fireworks/script_generator_schema_fireworks.pyindex f6f90ddf..6355a4e8 100644--- a/examples/fireworks/script_generator_schema_fireworks.py+++ b/examples/fireworks/script_generator_schema_fireworks.py@@ -5,7 +5,7 @@ Basic example of scraping pipeline using ScriptCreatorGraphimport osfrom typing import Listfrom dotenv import load_dotenv-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom scrapegraphai.graphs import ScriptCreatorGraphfrom scrapegraphai.utils import prettify_exec_infodiff --git a/examples/fireworks/search_graph_schema_fireworks.py b/examples/fireworks/search_graph_schema_fireworks.pyindex a16d3ae2..d88d991e 100644--- a/examples/fireworks/search_graph_schema_fireworks.py+++ b/examples/fireworks/search_graph_schema_fireworks.py@@ -9,7 +9,7 @@ load_dotenv()from scrapegraphai.graphs import SearchGraphfrom scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom typing import List# ************************************************diff --git a/examples/fireworks/smart_scraper_schema_fireworks.py b/examples/fireworks/smart_scraper_schema_fireworks.pyindex cefb4d7d..d71593f3 100644--- a/examples/fireworks/smart_scraper_schema_fireworks.py+++ b/examples/fireworks/smart_scraper_schema_fireworks.py@@ -5,7 +5,7 @@ Basic example of scraping pipeline using SmartScraper with schemaimport os, jsonfrom typing import Listfrom dotenv import load_dotenv-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom scrapegraphai.graphs import SmartScraperGraphload_dotenv()diff --git a/examples/google_genai/search_graph_schema_gemini.py b/examples/google_genai/search_graph_schema_gemini.pyindex 3c44dd2d..e4b7983d 100644--- a/examples/google_genai/search_graph_schema_gemini.py+++ b/examples/google_genai/search_graph_schema_gemini.py@@ -9,7 +9,7 @@ load_dotenv()from scrapegraphai.graphs import SearchGraphfrom scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom typing import List# ************************************************diff --git a/examples/google_genai/smart_scraper_schema_gemini.py b/examples/google_genai/smart_scraper_schema_gemini.pyindex 8096c466..6c817e20 100644--- a/examples/google_genai/smart_scraper_schema_gemini.py+++ b/examples/google_genai/smart_scraper_schema_gemini.py@@ -4,7 +4,7 @@ Basic example of scraping pipeline using SmartScraper with schemaimport osfrom typing import List-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom dotenv import load_dotenvfrom scrapegraphai.utils import prettify_exec_infofrom scrapegraphai.graphs import SmartScraperGraphdiff --git a/examples/google_vertexai/search_graph_schema_gemini.py b/examples/google_vertexai/search_graph_schema_gemini.pyindex 7e73c584..54586c7e 100644--- a/examples/google_vertexai/search_graph_schema_gemini.py+++ b/examples/google_vertexai/search_graph_schema_gemini.py@@ -9,7 +9,7 @@ load_dotenv()from scrapegraphai.graphs import SearchGraphfrom scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom typing import List# ************************************************diff --git a/examples/google_vertexai/smart_scraper_schema_gemini.py b/examples/google_vertexai/smart_scraper_schema_gemini.pyindex 18e0ef5b..541ce9aa 100644--- a/examples/google_vertexai/smart_scraper_schema_gemini.py+++ b/examples/google_vertexai/smart_scraper_schema_gemini.py@@ -4,7 +4,7 @@ Basic example of scraping pipeline using SmartScraper with schemaimport osfrom typing import List-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom dotenv import load_dotenvfrom scrapegraphai.utils import prettify_exec_infofrom scrapegraphai.graphs import SmartScraperGraphdiff --git a/examples/groq/search_graph_schema_groq.py b/examples/groq/search_graph_schema_groq.pyindex d5253f2c..4cc2209d 100644--- a/examples/groq/search_graph_schema_groq.py+++ b/examples/groq/search_graph_schema_groq.py@@ -9,7 +9,7 @@ load_dotenv()from scrapegraphai.graphs import SearchGraphfrom scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom typing import List# ************************************************diff --git a/examples/groq/smart_scraper_schema_groq.py b/examples/groq/smart_scraper_schema_groq.pyindex b2b377b3..f9c1a40b 100644--- a/examples/groq/smart_scraper_schema_groq.py+++ b/examples/groq/smart_scraper_schema_groq.py@@ -4,7 +4,7 @@ Basic example of scraping pipeline using SmartScraper with schemaimport os, jsonfrom typing import List-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom dotenv import load_dotenvfrom scrapegraphai.graphs import SmartScraperGraphfrom scrapegraphai.utils import prettify_exec_infodiff --git a/examples/integrations/indexify_node_example.py b/examples/integrations/indexify_node_example.pyindex fae2403a..61db52d2 100644--- a/examples/integrations/indexify_node_example.py+++ b/examples/integrations/indexify_node_example.py@@ -8,7 +8,7 @@ from typing import Listfrom dotenv import load_dotenvload_dotenv()-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom scrapegraphai.graphs import SmartScraperGraphfrom scrapegraphai.integrations import IndexifyNodediff --git a/examples/local_models/search_graph_schema_ollama.py b/examples/local_models/search_graph_schema_ollama.pyindex 6720383c..fb87954f 100644--- a/examples/local_models/search_graph_schema_ollama.py+++ b/examples/local_models/search_graph_schema_ollama.py@@ -4,7 +4,7 @@ Example of Search Graphfrom scrapegraphai.graphs import SearchGraphfrom scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom typing import List# ************************************************diff --git a/examples/local_models/smart_scraper_schema_ollama.py b/examples/local_models/smart_scraper_schema_ollama.pyindex 5f15b080..35503bd7 100644--- a/examples/local_models/smart_scraper_schema_ollama.py+++ b/examples/local_models/smart_scraper_schema_ollama.py@@ -3,7 +3,7 @@ Basic example of scraping pipeline using SmartScraper with schema"""import jsonfrom typing import List-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom scrapegraphai.graphs import SmartScraperGraphfrom scrapegraphai.utils import prettify_exec_infodiff --git a/examples/mistral/pdf_scraper_multi_mistral.py b/examples/mistral/pdf_scraper_multi_mistral.pyindex 18b8a1f0..e9f1613f 100644--- a/examples/mistral/pdf_scraper_multi_mistral.py+++ b/examples/mistral/pdf_scraper_multi_mistral.py@@ -5,7 +5,7 @@ import osimport jsonfrom typing import Listfrom dotenv import load_dotenv-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom scrapegraphai.graphs import PdfScraperMultiGraphload_dotenv()diff --git a/examples/mistral/script_generator_schema_mistral.py b/examples/mistral/script_generator_schema_mistral.pyindex beaca4c1..3ad46685 100644--- a/examples/mistral/script_generator_schema_mistral.py+++ b/examples/mistral/script_generator_schema_mistral.py@@ -6,7 +6,7 @@ import osfrom dotenv import load_dotenvfrom scrapegraphai.graphs import ScriptCreatorGraphfrom scrapegraphai.utils import prettify_exec_info-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom typing import Listload_dotenv()diff --git a/examples/mistral/search_graph_schema_mistral.py b/examples/mistral/search_graph_schema_mistral.pyindex d804d984..7c71c0b1 100644--- a/examples/mistral/search_graph_schema_mistral.py+++ b/examples/mistral/search_graph_schema_mistral.py@@ -5,7 +5,7 @@ Example of Search Graphimport osfrom typing import Listfrom dotenv import load_dotenv-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom scrapegraphai.graphs import SearchGraphfrom scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_infodiff --git a/examples/mistral/smart_scraper_schema_mistral.py b/examples/mistral/smart_scraper_schema_mistral.pyindex 517bd743..3e1e505a 100644--- a/examples/mistral/smart_scraper_schema_mistral.py+++ b/examples/mistral/smart_scraper_schema_mistral.py@@ -5,7 +5,7 @@ Basic example of scraping pipeline using SmartScraper with schemaimport os, jsonfrom typing import Listfrom dotenv import load_dotenv-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom scrapegraphai.graphs import SmartScraperGraphload_dotenv()diff --git a/examples/nemotron/script_generator_schema_nemotron.py b/examples/nemotron/script_generator_schema_nemotron.pyindex 09d0d682..3f0713a4 100644--- a/examples/nemotron/script_generator_schema_nemotron.py+++ b/examples/nemotron/script_generator_schema_nemotron.py@@ -7,7 +7,7 @@ from dotenv import load_dotenvfrom scrapegraphai.graphs import ScriptCreatorGraphfrom scrapegraphai.utils import prettify_exec_info-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom typing import Listload_dotenv()diff --git a/examples/nemotron/search_graph_schema_nemotron.py b/examples/nemotron/search_graph_schema_nemotron.pyindex 84150f53..eec72daf 100644--- a/examples/nemotron/search_graph_schema_nemotron.py+++ b/examples/nemotron/search_graph_schema_nemotron.py@@ -9,7 +9,7 @@ load_dotenv()from scrapegraphai.graphs import SearchGraphfrom scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom typing import List# ************************************************diff --git a/examples/nemotron/smart_scraper_schema_nemotron.py b/examples/nemotron/smart_scraper_schema_nemotron.pyindex 11ce4de2..e1462e85 100644--- a/examples/nemotron/smart_scraper_schema_nemotron.py+++ b/examples/nemotron/smart_scraper_schema_nemotron.py@@ -5,7 +5,7 @@ Basic example of scraping pipeline using SmartScraper with schemaimport os, jsonfrom typing import Listfrom dotenv import load_dotenv-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom scrapegraphai.graphs import SmartScraperGraphload_dotenv()diff --git a/examples/oneapi/search_graph_schema_oneapi.py b/examples/oneapi/search_graph_schema_oneapi.pyindex d99bca00..7fc44539 100644--- a/examples/oneapi/search_graph_schema_oneapi.py+++ b/examples/oneapi/search_graph_schema_oneapi.py@@ -4,7 +4,7 @@ Example of Search Graphfrom scrapegraphai.graphs import SearchGraphfrom scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom typing import List# ************************************************diff --git a/examples/oneapi/smart_scraper_schema_oneapi.py b/examples/oneapi/smart_scraper_schema_oneapi.pyindex b12bbf66..0c011bb6 100644--- a/examples/oneapi/smart_scraper_schema_oneapi.py+++ b/examples/oneapi/smart_scraper_schema_oneapi.py@@ -2,7 +2,7 @@Basic example of scraping pipeline using SmartScraper and OneAPI"""from typing import List-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom scrapegraphai.graphs import SmartScraperGraphfrom scrapegraphai.utils import prettify_exec_infodiff --git a/examples/openai/pdf_scraper_multi_openai.py b/examples/openai/pdf_scraper_multi_openai.pyindex a405da43..91e219e3 100644--- a/examples/openai/pdf_scraper_multi_openai.py+++ b/examples/openai/pdf_scraper_multi_openai.py@@ -5,7 +5,7 @@ import osimport jsonfrom typing import Listfrom dotenv import load_dotenv-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom scrapegraphai.graphs import PdfScraperMultiGraphload_dotenv()diff --git a/examples/openai/script_generator_schema_openai.py b/examples/openai/script_generator_schema_openai.pyindex e8e7d111..5e542c53 100644--- a/examples/openai/script_generator_schema_openai.py+++ b/examples/openai/script_generator_schema_openai.py@@ -7,7 +7,7 @@ from dotenv import load_dotenvfrom scrapegraphai.graphs import ScriptCreatorGraphfrom scrapegraphai.utils import prettify_exec_info-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom typing import Listload_dotenv()diff --git a/examples/openai/search_graph_schema_openai.py b/examples/openai/search_graph_schema_openai.pyindex c0440955..571f08b0 100644--- a/examples/openai/search_graph_schema_openai.py+++ b/examples/openai/search_graph_schema_openai.py@@ -5,7 +5,7 @@ Example of Search Graphimport osfrom typing import Listfrom dotenv import load_dotenv-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom scrapegraphai.graphs import SearchGraphfrom scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_infodiff --git a/examples/openai/smart_scraper_schema_openai.py b/examples/openai/smart_scraper_schema_openai.pyindex f1ce3d14..0c1618d6 100644--- a/examples/openai/smart_scraper_schema_openai.py+++ b/examples/openai/smart_scraper_schema_openai.py@@ -5,7 +5,7 @@ Basic example of scraping pipeline using SmartScraper with schemaimport os, jsonfrom typing import Listfrom dotenv import load_dotenv-from langchain_core.pydantic_v1 import BaseModel, Field+from pydantic import BaseModel, Fieldfrom scrapegraphai.graphs import SmartScraperGraphload_dotenv()diff --git a/scrapegraphai/nodes/graph_iterator_node.py b/scrapegraphai/nodes/graph_iterator_node.pyindex 8781cf2d..e38461f1 100644--- a/scrapegraphai/nodes/graph_iterator_node.py+++ b/scrapegraphai/nodes/graph_iterator_node.py@@ -5,7 +5,7 @@ import asynciofrom typing import List, Optionalfrom tqdm.asyncio import tqdmfrom .base_node import BaseNode-from langchain_core.pydantic_v1 import BaseModel+from pydantic import BaseModelDEFAULT_BATCHSIZE = 16