Skip to content

Commit

Permalink
Add timeout for appbrain
Browse files Browse the repository at this point in the history
  • Loading branch information
ddxv committed Oct 18, 2023
1 parent e90245b commit b6aec80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adscrawler/app_stores/appbrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def scrape_for_ids(collection: str, category: str | None = None) -> list[str]:
url_part = f"/{collection}/new"
else:
url_part = f"/{collection}/{category}/new"
response = requests.get(APPBRAIN_BASE_URL + url_part, headers=HEADERS)
response = requests.get(APPBRAIN_BASE_URL + url_part, headers=HEADERS, timeout=2)
if response.status_code == 200:
packages = re.findall(HTML_PATTERN, response.content.decode("utf-8"))
else:
Expand Down

0 comments on commit b6aec80

Please sign in to comment.