Skip to content

Commit

Permalink
fix get list request to nocodb
Browse files Browse the repository at this point in the history
  • Loading branch information
wenhwang97 committed Feb 9, 2025
1 parent b1114f8 commit 06b5783
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scraper/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def scrape_country(country, latest_date, keywords):
}

req = requests.get(url, headers=headers, params=params)
if len(req.json().get("list")) > 0:
if len(req.json()["list"]) > 0:
print(f"[MOF Scraper] Article {link} already exists in the database, skipping...")
continue

Expand Down Expand Up @@ -255,7 +255,7 @@ def scrape():

# check if article already exists in the database
req = requests.get(url, headers=headers, params=params)
if len(req.json().get("list")) == 0:
if len(req.json()["list"]) == 0:
requests.post(url, headers=headers, json=article)

timeend = datetime.now()
Expand Down

0 comments on commit 06b5783

Please sign in to comment.