Refrain from polling at the weekend

master
alex 2022-09-04 11:21:10 +02:00
parent a4c9611fc9
commit 9135325708
1 changed files with 8 additions and 0 deletions

View File

@ -1,4 +1,5 @@
import base64
from datetime import datetime
import json
import os
import threading
@ -23,6 +24,13 @@ def check_exists_by_xpath(self, xpath):
class Bot:
def __init__(self):
dt = datetime.now()
# saturday, sunday
if dt.isoweekday() == 6 or dt.isoweekday() == 7:
print("No request required today")
return
options = webdriver.ChromeOptions()
if os.environ.get("browserDebug") == "false":