mirror of
https://github.com/sigmasternchen/MinervaBot
synced 2025-03-15 07:59:00 +00:00
let's try this
This commit is contained in:
parent
792f8eefa0
commit
fed87bec8d
1 changed files with 3 additions and 3 deletions
6
main.py
6
main.py
|
@ -16,7 +16,7 @@ logfile = open(LOG_FILE, LOG_TYPE)
|
|||
|
||||
def log(text):
|
||||
logfile.write(datetime.datetime.now().isoformat() + ": " + text + "\n")
|
||||
print (datetime.datetime.now().isoformat() + ": " + text + "\n")
|
||||
print(datetime.datetime.now().isoformat() + ": " + text + "\n")
|
||||
|
||||
def connect():
|
||||
auth = tweepy.OAuthHandler(
|
||||
|
@ -25,7 +25,7 @@ def connect():
|
|||
)
|
||||
if USE_PIN_AUTH:
|
||||
if not ('ACCESS_TOKEN_KEY' in vars() or 'a' in globals()):
|
||||
print ("auth url: " + auth.get_authorization_url())
|
||||
print("auth url: " + auth.get_authorization_url())
|
||||
pin = raw_input("pin: ").strip()
|
||||
token = auth.get_access_token(
|
||||
verfier = pin
|
||||
|
@ -46,7 +46,7 @@ def connect():
|
|||
api = tweepy.API(auth)
|
||||
|
||||
if not api.verify_credentials():
|
||||
print "error! auth failed."
|
||||
print("error! auth failed.")
|
||||
sys.exit(1)
|
||||
else:
|
||||
return api
|
||||
|
|
Loading…
Reference in a new issue