From 3bbe7475e2e71aae309111da639b6e8a3561a513 Mon Sep 17 00:00:00 2001 From: pablomartincalvo Date: Fri, 16 Nov 2018 18:45:42 +0100 Subject: [PATCH] Correciones para deteccion de anuncios dados de baja. --- capturer/capturer.py | 2 +- tests/scrapping_utils_tests.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/capturer/capturer.py b/capturer/capturer.py index a5ce531..4e92798 100644 --- a/capturer/capturer.py +++ b/capturer/capturer.py @@ -77,7 +77,7 @@ class CapturingTask: self._check_data() return - elif Refresher.dead_ad_checker(self.html): + elif Refresher.dead_ad_checker(attack.get_text()): self._update_status('Dead ad') return else: diff --git a/tests/scrapping_utils_tests.py b/tests/scrapping_utils_tests.py index ad3aaab..576b3af 100644 --- a/tests/scrapping_utils_tests.py +++ b/tests/scrapping_utils_tests.py @@ -9,7 +9,9 @@ def UrlAttack_test(url): attack.attack() print(attack.get_status_code()) + print(attack.success) print(attack.get_response()) + print(attack.get_text()) -UrlAttack_test('https://www.idealista.com/inmueble/40402493/') \ No newline at end of file +UrlAttack_test('https://www.idealista.com/inmueble/82810718/') \ No newline at end of file