问题解一
(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)

浙公网安备 33010602011771号