Advertisement
Guest User

Untitled

a guest
Dec 17th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. self.connection = pymysql.connect(host='localhost',
  2. user='root',
  3. password='s3cr3tp@ssw0rd',
  4. db='scrapper',
  5. charset='utf8',
  6. cursorclass=pymysql.cursors.DictCursor, autocommit=True)
  7.  
  8. sql2 = "SELECT * FROM `linksparsed`"
  9. try:
  10. cursor.execute(sql2)
  11. #self.connection.commit()
  12. except Exception as ex:
  13. print(ex)
  14.  
  15. result = cursor.fetchall()
  16. totalLength = len(result)
  17. for row in cursor:
  18. self.parsedLinks.append(row)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement