在pipelines中设置连接mysql数据库 import MySQLdb class Zwlpipelines(object): def __init__(self): self.conn = MySQLdb.connect( host = '127.0.0.1',post =