Automatic Scraping of dataset options #9

Merged
dylan merged 36 commits from feat/automatic-scraping-datasets into main 2026-03-14 21:58:49 +00:00
Showing only changes of commit d2b919cd66 - Show all commits

View File

@@ -150,15 +150,19 @@ def scrape_data():
if "name" not in source:
return jsonify({"error": "Each source must contain a name"}), 400
if "limit" in source:
name = source["name"]
limit = source.get("limit", 1000)
category = source.get("category")
search = source.get("search")
if limit:
try:
source["limit"] = int(source["limit"])
limit = int(limit)
except (ValueError, TypeError):
return jsonify({"error": "Limit must be an integer"}), 400
name = source["name"]
category = source.get("category")
search = source.get("search")
if limit > 1000:
limit = 1000
if name not in connector_metadata:
return jsonify({"error": "Source not supported"}), 400