Python scraper based on AI
Python ai-crawlerai-scrapingai-searchcrawlerdata-extractionfirecrawl-alternativelarge-language-modelllmmarkdownragscrapingscraping-pythonweb-crawlerweb-crawlersweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
Added missing logic to extract model_name from model_id
JGalego05ecc3ae2034
diff --git a/scrapegraphai/nodes/robots_node.py b/scrapegraphai/nodes/robots_node.pyindex 7aea6cae..cce8fdaa 100644--- a/scrapegraphai/nodes/robots_node.py+++ b/scrapegraphai/nodes/robots_node.py@@ -96,10 +96,12 @@ class RobotsNode(BaseNode):base_url = f"{parsed_url.scheme}://{parsed_url.netloc}"loader = AsyncChromiumLoader(f"{base_url}/robots.txt")document = loader.load()- if "ollama" in self.llm_model.model_name:+ if hasattr(self.llm_model, "model_name") and "ollama" in self.llm_model.model_name:self.llm_model.model_name = self.llm_model.model_name.split("/")[-1]model = self.llm_model.model_name.split("/")[-1]-+ elif hasattr(self.llm_model, "model_id"): # Bedrock uses model IDs, not model names+ self.llm_model.model_name = self.llm_model.model_id.split("/")[-1]+ model = self.llm_model.model_nameelse:model = self.llm_model.model_nametry: