diff --git a/csvdb.py b/csvdb.py index 15b6a0a..153f413 100755 --- a/csvdb.py +++ b/csvdb.py @@ -2,7 +2,7 @@ import tools -import sqlite3, csv +import sqlite3, csv, sys def makeDB(path=tools.dbpath()): try: diff --git a/getmentions.py b/getmentions.py index e0c9c1b..833f6ca 100755 --- a/getmentions.py +++ b/getmentions.py @@ -11,7 +11,7 @@ def getTweets(mode = "@", path = tools.dbpath()): tweets = db.executeQuery("SELECT text FROM tweets") for tweet in tweets: - for word in tweet[0].split(): + for word in tweet[0].lower().split(): if word[0] == mode or mode == "": if mode == "": handle = word diff --git a/tools.py b/tools.py index 76dd77a..d39a1eb 100644 --- a/tools.py +++ b/tools.py @@ -20,13 +20,13 @@ def cke(): try: return getSetting("Twitter", "cke") except: - return "V6ekVFYtavi6IvRFLS0dHifSh" + raise SetupException() def cse(): try: return getSetting("Twitter", "cse") except: - return "U2duSfBtW0Z8UQFoJyARf3jU80gdQ44EEqWqC82ebuGbIPN3t7" + raise SetupException() def ato(): try: @@ -36,15 +36,12 @@ def ato(): def ase(): try: - return getSetting("Twitter", "ato") + return getSetting("Twitter", "ase") except: raise SetupException() def user(): - try: - return twObject().whoami() - except: - raise SetupException() + return twObject().whoami() class dbObject: @@ -98,7 +95,7 @@ class twObject: return tweets def whoami(self): - return self.api.me().screen_name + return self.auth.get_username() def dbCheck(db, create = False):