I would build the insert like so:

db = MySQLdb.connect("localhost","root"," ","test",charset="utf8", 
use_unicode=True )
cursor = db.cursor()
sql = "INSERT INTO infosec (titlename, standname) VALUES ('%s', '%s')"
args =  (item['titlename'].encode('utf-8'), 
item['standname'].encode('utf-8'))
cursor.execute(sql, args)
db.commit()

But I would also make it a function and call the function from the pipe.

As for not getting errors, I would put some log entries all over the pipe 
and print out the status of the item and make sure that the items are even 
getting to the DB call.

Hope that helps a little,

Bill

-- 
You received this message because you are subscribed to the Google Groups 
"scrapy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/scrapy-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to