Skip to content

Commit

Permalink
tasks bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan-g committed Dec 1, 2024
1 parent 4cd96ce commit 24d88d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion say/crawler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def get_data(self, force=False):
r = requests.get(url)
else:
r = request_with_cache(url)

if r.status_code == 200:
result = r.json()

Expand All @@ -140,6 +140,9 @@ def get_data(self, force=False):
r = request_with_cache(url)
result = r.json()

print("url and result:")
print(url)
print(result)

if r.status_code != 200:
return
Expand Down
1 change: 1 addition & 0 deletions say/models/need_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ def update(self, force=False):
if 'digikala' in self.link:
print("updating via crawler.....")
data = DigikalaCrawler(self.link).get_data(force=force)
print("Done updating.")
else:
data = Crawler(self.link).get_data(force=force)

Expand Down

0 comments on commit 24d88d3

Please sign in to comment.