From 3cafac4649aeeb54e1cc1a5ab8825f16abff18f0 Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Thu, 16 Feb 2017 01:29:49 +0100 Subject: [PATCH] Only use original tweets in Markov bot --- markov.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markov.py b/markov.py index 44d93b6..a6aa4e1 100755 --- a/markov.py +++ b/markov.py @@ -15,7 +15,7 @@ class Possy(markovify.NewlineText): def getText(db = dbtools.dbHelper()): text = "" - for string in db.executeQuery("SELECT text FROM tweets;"): + for string in db.executeQuery('SELECT text FROM tweets WHERE text NOT LIKE "@%" AND text NOT LIKE "RT %";'): text += string[0] + "\n" return "".join([s for s in text.strip().splitlines(True) if s.strip()])