Python scraper based on AI
Python ai-crawlerai-scrapingai-searchcrawlerdata-extractionfirecrawl-alternativelarge-language-modelllmmarkdownragscrapingscraping-pythonweb-crawlerweb-crawlersweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
refactor of conbert to json function
VinciGit0074d7ef614adb
diff --git a/scrapegraphai/utils/convert_to_json.py b/scrapegraphai/utils/convert_to_json.pyindex 8ac282cd..c349ad1d 100644--- a/scrapegraphai/utils/convert_to_json.py+++ b/scrapegraphai/utils/convert_to_json.py@@ -22,7 +22,7 @@ def convert_to_json(data: dict, filename: str, position: str = None):PermissionError: If the program does not have permission to write to the directory."""if ".json" in filename:- raise ValueError("The filename should not contain '.json'")+ filename = filename.replace(".json", "") # Remove .csv extension# Get the directory of the caller scriptif position is None: