From 7179c36af10fc57b1df3daf4609d8d581cd4ebeb Mon Sep 17 00:00:00 2001 From: robinuniverse Date: Mon, 12 Jul 2021 14:49:29 -0500 Subject: [PATCH] Made it so hybrid mode actually works :p (thanks maddie) --- twitfix.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/twitfix.py b/twitfix.py index dc7fd8a..5a84356 100644 --- a/twitfix.py +++ b/twitfix.py @@ -18,7 +18,7 @@ f = open("config.json") config = json.load(f) f.close() -if config['config']['method'] == "api": +if config['config']['method'] in ('api', 'hybrid'): auth = twitter.oauth.OAuth(config['api']['access_token'], config['api']['access_secret'], config['api']['api_key'], config['api']['api_secret']) twitter_api = twitter.Twitter(auth=auth) @@ -122,8 +122,9 @@ def linkToVNF(vidlink): # Return a VideoInfo object or die trying if config['config']['method'] == 'hybrid': try: return linkToVNFfromAPI(vidlink) - except Exception: + except Exception as e: print("API Failed") + print(e) return linkToVNFfromYoutubeDL(vidlink) elif config['config']['method'] == 'api': try: