add new filter to sms
This commit is contained in:
@@ -110,6 +110,7 @@ def handle_sms(sms):
|
||||
date = str(sms.time)[0:10]
|
||||
if date == str(datetime.date.today()):
|
||||
logger.info("this sms is for today")
|
||||
if "rendez-vous" in sms.text:
|
||||
logger.info("try to extract the otp")
|
||||
pattern = r'\d{6,8}'
|
||||
# if re.match(pattern, sms.text):
|
||||
@@ -126,6 +127,8 @@ def handle_sms(sms):
|
||||
if current_gsm_modem:
|
||||
logger.info("will close used modem")
|
||||
current_gsm_modem.close()
|
||||
else:
|
||||
logger.info("the sms is not for RDV")
|
||||
else:
|
||||
logger.info("the sms is not for today")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user