Skip to content

Commit

Permalink
celeray task
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan-g committed Sep 15, 2024
1 parent 6367f73 commit 39da9e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions say/crawler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,16 @@ def get_data(self, need_id, force=False):
r = requests.get(url)
else:
r = request_with_cache(url)
if r.status != 200:
if r.status_code != 200:
print(r)
if r.status == 302 and "fresh" in r["redirect_url"]["uri"]:
if r.status_code == 302:
print("Checking if fresh product...")
url = self.API_URL_FRESH % self.dkp
if force:
r = requests.get(url)
else:
r = request_with_cache(url)
if r.status != 200:
if r.status_code != 200:
print("Could not call the digikala api", need_id )
return
else:
Expand Down

0 comments on commit 39da9e2

Please sign in to comment.