diff --git a/say/crawler/__init__.py b/say/crawler/__init__.py index e5d82fec..ee5558a7 100644 --- a/say/crawler/__init__.py +++ b/say/crawler/__init__.py @@ -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() @@ -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 diff --git a/say/models/need_model.py b/say/models/need_model.py index fd0117c5..ce604eac 100644 --- a/say/models/need_model.py +++ b/say/models/need_model.py @@ -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)