Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
quit early before raising 404 status
Browse files Browse the repository at this point in the history
  • Loading branch information
feederbox826 committed Dec 21, 2024
1 parent eef780d commit 971cbb7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/SHALookup/SHALookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ def getPostByHash(hash):
shares = requests.get('https://coomer.su/api/v1/search_hash/' + hash, headers=headers, timeout=10)
if shares.status_code == 200:
break
if shares.status_code == 404:
log.debug("No results found")
return None
log.debug(f"Request status code: {shares.status_code}")
time.sleep(2)
shares.raise_for_status()
Expand Down

0 comments on commit 971cbb7

Please sign in to comment.