test-selenium / main_truyentranh8.py
tqhoa's picture
test
063b4bb
raw
history blame contribute delete
961 Bytes
import time
import sys
from modules.sources.truyentranh8 import TruyenTranh8
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()
truyentranh8 = TruyenTranh8()
try:
truyentranh8.selenium_upload_custom_task()
truyentranh8.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")