test-selenium / main_thichtruyen.py
tqhoa's picture
test
063b4bb
raw
history blame contribute delete
No virus
957 Bytes
import time
import sys
from modules.sources.thichtruyen import ThichTruyen
from modules import untils
from modules.sources import system_status
from modules import g_config, logger
if __name__ == '__main__':
while True:
logger.info("Starting program")
if g_config.USE_SELENIUM:
untils.close_all_chrome_browsers()
untils.tear_down_python_scripts()
thich_truyen = ThichTruyen()
try:
thich_truyen.selenium_upload_custom_task()
thich_truyen.get_list_manga_newest()
except KeyboardInterrupt:
logger.warning("Stop manual")
if g_config.USE_SELENIUM:
untils.close_all_chrome_browsers()
sys.exit()
except:
if g_config.USE_SELENIUM:
untils.close_all_chrome_browsers()
sys.exit()
if system_status["error"]:
logger.error("System error - restarting")