Skip to content

Python scraper based on AI

add examples

Marco Vinciguerradd2b3a8f59ff
diff --git a/examples/gemini/smart_scraper_schema_gemini.py b/examples/gemini/smart_scraper_schema_gemini.py
index 3f9326ff..462ff61b 100644
--- a/examples/gemini/smart_scraper_schema_gemini.py
+++ b/examples/gemini/smart_scraper_schema_gemini.py
@@ -54,3 +54,4 @@ print(result)
graph_exec_info = smart_scraper_graph.get_execution_info()
print(prettify_exec_info(graph_exec_info))
+```
\ No newline at end of file
diff --git a/examples/oneapi/json_scraper_multi_oneapi..py b/examples/oneapi/json_scraper_multi_oneapi.py
similarity index 100%
rename from examples/oneapi/json_scraper_multi_oneapi..py
rename to examples/oneapi/json_scraper_multi_oneapi.py
diff --git a/examples/oneapi/pdf_scraper_graph_oneapi.py b/examples/oneapi/pdf_scraper_graph_oneapi.py
index cd804dc2..5d0a238a 100644
--- a/examples/oneapi/pdf_scraper_graph_oneapi.py
+++ b/examples/oneapi/pdf_scraper_graph_oneapi.py
@@ -24,28 +24,11 @@ source = """
the Beatrice of his earlier poetry, through the celestial spheres of Paradise.
"""
-schema = """
- {
- "type": "object",
- "properties": {
- "summary": {
- "type": "string"
- },
- "topics": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
-"""
pdf_scraper_graph = PDFScraperGraph(
prompt="Summarize the text and find the main topics",
source=source,
config=graph_config,
- schema=schema,
)
result = pdf_scraper_graph.run()
diff --git a/examples/openai/pdf_scraper_graph_openai.py b/examples/openai/pdf_scraper_graph_openai.py
index b0fc187a..e07a7ab5 100644
--- a/examples/openai/pdf_scraper_graph_openai.py
+++ b/examples/openai/pdf_scraper_graph_openai.py
@@ -30,28 +30,10 @@ source = """
the Beatrice of his earlier poetry, through the celestial spheres of Paradise.
"""
-schema = """
- {
- "type": "object",
- "properties": {
- "summary": {
- "type": "string"
- },
- "topics": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
-"""
-
pdf_scraper_graph = PDFScraperGraph(
prompt="Summarize the text and find the main topics",
source=source,
config=graph_config,
- schema=schema,
)
result = pdf_scraper_graph.run()