Only use original tweets in Markov bot

This commit is contained in:
Klaus-Uwe Mitterer 2017-02-16 01:29:49 +01:00
parent 64aa08bcbc
commit d8c07f33a5

View file

@ -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()])