Python scraper based on AI
Python ai-crawlerai-scrapingai-searchcrawlerdata-extractionfirecrawl-alternativelarge-language-modelllmmarkdownragscrapingscraping-pythonweb-crawlerweb-crawlersweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
feat: refactoring fetch_node
Marco Vinciguerra39a029ed9a8c
diff --git a/scrapegraphai/nodes/fetch_node.py b/scrapegraphai/nodes/fetch_node.pyindex a548e05b..fbd94a83 100644--- a/scrapegraphai/nodes/fetch_node.py+++ b/scrapegraphai/nodes/fetch_node.py@@ -124,7 +124,7 @@ class FetchNode(BaseNode):return handlers[input_type](state, input_type, source)elif self.input == "pdf_dir":return state- elif not source.startswith("http"):+ elif not source.startswith("http") or not source.startswith("www"):return self.handle_local_source(state, source)else:return self.handle_web_source(state, source)@@ -307,6 +307,7 @@ class FetchNode(BaseNode):if not document or not document[0].page_content.strip():raise ValueError("""No HTML body content found inthe document fetched by ChromiumLoader.""")+parsed_content = document[0].page_contentif (isinstance(self.llm_model, ChatOpenAI) \