(1)用pycharm连接mysql时,需要安装一个驱动,点击连接界面,如果Test Connection不可用,点击右边的按钮即可
(2)如果要将同一网站不同链接的数据存入数据库,可考虑重写start_requests
eg:
for index,href in enumerate(self.start_urls):
if index==0:
yield scrapy.Request(url=href, callback=函数名一, dont_filter=False)
elif index==1:
yield scrapy.Request(url=href, callback=函数名二, dont_filter=False)
标签:index,dont,start,解一,问题,callback,scrapy,href From: https://www.cnblogs.com/ljzyh/p/17416751.html