pipelines.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:spider 作者: qcl643062 项目源码 文件源码
def __do__insert(self, conn, item, spider):
        try:
            conn.execute("""
                insert into 58pbdndb set title = %s, area = %s, price = %s, quality = %s, time = %s
            """, (item['title'], item['area'], item['price'], item['quality'], item['time']))

        except MySQLdb.Error, e:
            spider.log("Mysql Error %d: %s" % (e.args[0], e.args[1]), level=log.DEBUG)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号