Python scraper based on AI
Python ai-crawlerai-scrapingai-searchcrawlerdata-extractionfirecrawl-alternativelarge-language-modelllmmarkdownragscrapingscraping-pythonweb-crawlerweb-crawlersweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
refactoring of fetch node
Marco Vinciguerra2f02830c819a
diff --git a/examples/local_models/smart_scraper_ollama.py b/examples/local_models/smart_scraper_ollama.pyindex ded6f308..aab77360 100644--- a/examples/local_models/smart_scraper_ollama.py+++ b/examples/local_models/smart_scraper_ollama.py@@ -9,7 +9,7 @@ from scrapegraphai.utils import prettify_exec_infograph_config = {"llm": {- "model": "ollama/llama3",+ "model": "ollama/mistral","temperature": 0,"format": "json", # Ollama needs the format to be specified explicitly# "base_url": "http://localhost:11434", # set ollama URL arbitrarilydiff --git a/examples/openai/smart_scraper_openai.py b/examples/openai/smart_scraper_openai.pyindex bae4f688..7e147491 100644--- a/examples/openai/smart_scraper_openai.py+++ b/examples/openai/smart_scraper_openai.py@@ -30,10 +30,9 @@ graph_config = {# ************************************************smart_scraper_graph = SmartScraperGraph(- prompt="List me all the projects with their description",- # also accepts a string with the already downloaded HTML code- source="https://perinim.github.io/projects/",- config=graph_config,+ prompt="List me all the titles of the articles",+ source="https://www.wired.com",+ config=graph_config)result = smart_scraper_graph.run()diff --git a/scrapegraphai/nodes/fetch_node.py b/scrapegraphai/nodes/fetch_node.pyindex 71f69c36..f38cdfb9 100644--- a/scrapegraphai/nodes/fetch_node.py+++ b/scrapegraphai/nodes/fetch_node.py@@ -170,7 +170,7 @@ class FetchNode(BaseNode):parsed_content = convert_to_md(document[0].page_content)compressed_document = [- Document(page_content=parsed_content, metadata={"source": parsed_content})+ Document(page_content=parsed_content, metadata={"source": "html file"})]state.update(