Python scraper based on AI
Python ai-crawlerai-scrapingai-searchcrawlerdata-extractionfirecrawl-alternativelarge-language-modelllmmarkdownragscrapingscraping-pythonweb-crawlerweb-crawlersweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
fix: validate URL only if the input type is a URL
Georgios Savvidise2caee695ecc
diff --git a/scrapegraphai/nodes/fetch_node.py b/scrapegraphai/nodes/fetch_node.pyindex 284868ff..75306bea 100644--- a/scrapegraphai/nodes/fetch_node.py+++ b/scrapegraphai/nodes/fetch_node.py@@ -131,12 +131,13 @@ class FetchNode(BaseNode):return state# For web sources, validate URL before proceeding- try:- if self.is_valid_url(source):- return self.handle_web_source(state, source)- except ValueError as e:- # Re-raise the exception from is_valid_url- raise+ if input_type == "url":+ try:+ if self.is_valid_url(source):+ return self.handle_web_source(state, source)+ except ValueError as e:+ # Re-raise the exception from is_valid_url+ raisereturn self.handle_local_source(state, source)