Python scraper based on AI
Python ai-crawlerai-scrapingai-searchcrawlerdata-extractionfirecrawl-alternativelarge-language-modelllmmarkdownragscrapingscraping-pythonweb-crawlerweb-crawlersweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
minor changes
mayurdb8f1fbe7e10dc
diff --git a/examples/openai/deep_scraper_openai.py b/examples/openai/deep_scraper_openai.pyindex 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 filediff --git a/scrapegraphai/graphs/deep_scraper_graph.py b/scrapegraphai/graphs/deep_scraper_graph.pyindex 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.pyindex 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 tagminimized_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