Refrain from polling at the weekend
parent
a4c9611fc9
commit
9135325708
8
main.py
8
main.py
|
@ -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":
|
||||
|
|
Loading…
Reference in New Issue