Formatting.

This commit is contained in:
pablo 2020-11-03 07:29:17 +01:00
parent cd9c3b6e39
commit a79fc533ee
11 changed files with 231 additions and 204 deletions

View file

@ -1,5 +1,6 @@
import sys
sys.path.append('..')
sys.path.append("..")
from time import sleep
from db_layer.capturas_interface import capturas_interface
from db_layer.capturing_tasks_interface import capturing_interface
@ -7,7 +8,6 @@ from core.config import refresher_delay
class Refresher:
def start(self):
while True:
@ -15,7 +15,7 @@ class Refresher:
old_ad = capturas_interface.get_old_ad()
if old_ad:
capturing_interface.create_capturing_task(str(old_ad['referencia']))
capturing_interface.create_capturing_task(str(old_ad["referencia"]))
@staticmethod
def dead_ad_checker(html):
@ -25,7 +25,7 @@ class Refresher:
:return: True si esta dado de baja, False si no.
"""
try:
if ':-|' in html or 'El anunciante lo dio de baja' in html:
if ":-|" in html or "El anunciante lo dio de baja" in html:
return True
else:
return False
@ -33,17 +33,6 @@ class Refresher:
return False
if __name__ == '__main__':
if __name__ == "__main__":
refresher = Refresher()
refresher.start()