class Job(Item):
a_title = Field()
b_url = Field()
c_date = Field()
d_pub = Field()
class stage(Spider):
name = 'jobs'
start_urls = ['http://www.stagiaire.com/offres-stages.html/']
def parse(self, response):
for i in response.css('.info-offre'):
title = i.css('.titleads::text').extract()
url = i.css('.titleads::attr(href)').extract()
date = i.css('.date-offre.tip::text').extract()
pub = i.css('.content-1+ .content-1 .date-offre::text').extract()
yield Job(a_title=title, b_url=url, c_date=date, d_pub=pub)
this my output導出我的數據導入CSV時,我的輸出是因爲標籤的可能障礙和空格
將所有代碼包裝在標籤中 – dbmitch
您可以發佈csv文本源代碼而不是圖片嗎? – Granitosaurus