Skip to content

Python scraper based on AI

minor changes

mayurdb8f1fbe7e10dc
diff --git a/examples/openai/deep_scraper_openai.py b/examples/openai/deep_scraper_openai.py
index df0e480f..f87d7cb5 100644
--- a/examples/openai/deep_scraper_openai.py
+++ b/examples/openai/deep_scraper_openai.py
@@ -43,4 +43,5 @@ print(result)
# ************************************************
graph_exec_info = deep_scraper_graph.get_execution_info()
-print(prettify_exec_info(graph_exec_info))
+print(deep_scraper_graph.get_state("relevant_links"))
+print(prettify_exec_info(graph_exec_info))
\ No newline at end of file
diff --git a/scrapegraphai/graphs/deep_scraper_graph.py b/scrapegraphai/graphs/deep_scraper_graph.py
index fe225b9a..4d6d4d4b 100644
--- a/scrapegraphai/graphs/deep_scraper_graph.py
+++ b/scrapegraphai/graphs/deep_scraper_graph.py
@@ -39,12 +39,12 @@ class DeepScraperGraph(AbstractGraph):
source (str): The source of the graph.
config (dict): Configuration parameters for the graph.
Example:
- >>> smart_scraper = DeepScraperGraph(
+ >>> deep_scraper = DeepScraperGraph(
... "List me all the job titles and detailed job description.",
- ... "https://en.wikipedia.org/wiki/Chioggia",
+ ... "https://www.google.com/about/careers/applications/jobs/results/?location=Bangalore%20India",
... {"llm": {"model": "gpt-3.5-turbo"}}
... )
- >>> result = smart_scraper.run()
+ >>> result = deep_scraper.run()
)
"""
diff --git a/scrapegraphai/utils/cleanup_html.py b/scrapegraphai/utils/cleanup_html.py
index bc16a99b..226e4a8b 100644
--- a/scrapegraphai/utils/cleanup_html.py
+++ b/scrapegraphai/utils/cleanup_html.py
@@ -45,9 +45,7 @@ def cleanup_html(html_content: str, base_url: str) -> str:
if body_content:
# Minify the HTML within the body tag
minimized_body = minify(str(body_content))
- print("Came here")
return "Title: " + title + ", Body: " + minimized_body + ", Links: " + str(link_urls)
- print("No Came here")
return "Title: " + title + ", Body: No body content found" + ", Links: " + str(link_urls)
\ No newline at end of file