The code below is streaming the twitter public timeline for a variable which output any tweets to the console. I\'d like the save the same variables (status.text, status.aut
Full disclosure: still new to this stuff. However, I got your code working by changing it to:
cur.execute("INSERT INTO TWEETS VALUES(?,?,?,?)", (status.text, status.author.screen_name, status.created_at, status.source))
con.commit()
It seems to me that you're reading in one status at a time. The executemany method would be for when you have more than one status. For example:
(['sometext', 'bob','2013-02-01','Twitter for Android'], ['someothertext', 'helga', '2013-01-31', 'MacSomething'])
I'm definitely not a wizard and am not sure what sort of impact the commit() has on every entry... I'm guessing the performance is terrible, but it works for a single term in the query.
Thanks for posting your code, I finally learned how to do streaming.