-
Notifications
You must be signed in to change notification settings - Fork 5
/
main.py
21 lines (19 loc) · 924 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from app.config import Config
from app.app import App
app = App(__name__)
if __name__ == '__main__':
config_loader = Config()
config_loader.load_dotenv()
config = config_loader.get_config()
app.init(config)
app.logger.debug("=====================================================================================")
app.logger.debug(f"Authorized on pixiv account {config['username']}. Please wait for authentication.")
success, msg = app.run_services()
if success:
app.logger.debug("Pixiv Login Complete.")
app.logger.debug("=====================================================================================")
app.run(host='0.0.0.0', port=config['port'])
else:
app.logger.debug(msg)
app.logger.debug("Application ends gracefully.")
app.logger.debug("=====================================================================================")