Finalizado y testeado localmente refresher, listo para testear en

entorno.
This commit is contained in:
pablomartincalvo 2018-10-16 21:19:35 +02:00
parent 8f5a120096
commit 3fdbc5f766
5 changed files with 501 additions and 144 deletions

View file

@ -13,13 +13,20 @@ class Refresher:
old_ad = capturas_interface.get_old_ad()
capturing_interface.create_capturing_task(old_ad['referencia'])
def dead_ad_checker(self, html):
#TODO Comprueba si el anuncio esta muerto y, si es asi, lo marca en la tabla de capturas
if blabla:
capturas_interface.mark_dead_ad(referencia)
@staticmethod
def dead_ad_checker(html):
"""
Comprueba si el html es de un anuncio dado de baja.
:param html: HTML del anuncio en string.
:return: True si esta dado de baja, False si no.
"""
if ':-|' in html or 'El anunciante lo dio de baja' in html:
return True
else:
return False