def show(self,response): # print(response.url) title = response.xpath('//main/div/div/div/div/h1/text()').extract() print(title) shijian_time = datetime.strptime(''.join(response.xpath('//main/div/div/div/div/div/span[1]/text()').extract()),'%Y年%m月%d日 %H:%M:%S').strftime('%Y/%m/%d %H:%M:%S') print(shijian_time)#时间格转换,先转换成字符串,在转换成时间格式