Not detecting duplicates properly yet.
Switching from MySQLdb to mysql.connector