added environment variables

This commit is contained in:
Kónya Márton 2020-07-20 09:46:34 +02:00
parent 23bd102e54
commit 399f8d8fa1
2 changed files with 9 additions and 2 deletions

3
.gitignore vendored
View File

@ -1 +1,2 @@
*.txt
*.txt
*.env

8
run.py
View File

@ -9,6 +9,7 @@ import datetime
from apscheduler.schedulers.blocking import BlockingScheduler
import logging
from prawcore import NotFound
from dotenv import load_dotenv
def sub_exists(sub):
exists = True
@ -107,6 +108,11 @@ In that case please turn off 2FA because it\'s not compatible with this script!
''')
exit()
reddit.validate_on_submit = True
load_dotenv('creds.env')
USER_SECRET = os.getenv('USERSECRET')
SECRET = os.getenv('SECRET2')
ready = '0'
checker = ['0', '0', '0'] # for checking if all neccesary functions have been run
@ -163,4 +169,4 @@ except (KeyboardInterrupt):
# while True:
# schedule.run_pending()
# time.sleep(1)
# time.sleep(1)