fix handling of db result -> dict

This commit is contained in:
2025-09-17 16:01:21 +02:00
parent b6f9d39ad8
commit c4761c257c

View File

@@ -141,9 +141,12 @@ def scraper():
job_urls = db_get_all_job_urls()
yield f"Processing {len(job_urls)} job pages...\n"
i = 0
for url, region, keyword in job_urls:
i += 1
for i, url_dict in enumerate(job_urls, start=1):
url = url_dict.get("url")
region = url_dict.get("region", "")
keyword = url_dict.get("keyword", "")
if not url:
continue
yield f"\n--- Processing job {i}/{len(job_urls)} ---\n"
for message in process_job_url(job_url=url, region=region, keyword=keyword):
yield message