Created
October 15, 2016 18:44
-
-
Save Yatoom/068512b00bdf55e631e949b9fe6ced4d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymysql.cursors | |
connection = pymysql.connect(host='localhost', user='slayer', password='', db='rumor_slayer', charset='utf8mb4', cursorclass=pymysql.cursors.DictCursor) | |
with connection.cursor() as cursor: | |
sql = "SELECT text FROM tweets" | |
cursor.execute(sql) | |
result = cursor.fetchall() | |
for tweet in result: | |
print(tweet['text']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment