Make a few improvements 

This needs to be cleaned up

# This insert() function is called by crawler.py 
def insert(id,title,mx_record,hostname,address,server,headers,country,html):
  try:
    cursor.execute("""INSERT INTO addresses VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s)""" ,(id,title,mx_record,hostname,address,server,headers,country,html))
    db.commit()
    return "Done"
    db.close()
  except:     
    db.rollback()
    db.close()
    return "Error"