def parse_row(self, response, row): i = MycsvItem() #i['url'] = row['url'] i['name'] = row['name'] i['sex'] = row['sex'] print(i['name']) print(i['sex']) #i['description'] = row['description'] return i
def parse_row(self, response, row): i = MycsvItem() #i['url'] = row['url'] #i['name'] = row['name'] #i['description'] = row['description'] i['name'] = row['name'].encode() i['sex'] = row['sex'].encode() print('名字是:', i['name'], '性别是:', i['sex']) return i
def parse_row(self, response, row): i = MycsvItem() i['name'] = row['name'].encode() i['sex'] = row['sex'].encode() print("名字是:") print(i['name']) print("性别是:") print(i['sex']) print("----------------------") return i
def parse_row(self, response, row): i = MycsvItem() i['name'] = row['name'].encode() i['sex'] = row['sex'].encode() print('名字是:') print(i['name']) print('性别:') print(i['sex']) print('*************************') return i
def parse_row(self, response, row): i = MycsvItem() i['name'] = row['name'] i['sex'] = row['sex'] print("名字是:") print(i['name']) print("性别是:") print(i['sex']) print("--------------------------------") #i['description'] = row['description'] return i
def parse_row(self, response, row): i = MycsvItem() #提取各行的name\sex\列信息 i['name'] = row['name'].encode() i['sex'] = row['sex'].encode() #输出 print('名字是:' + str(i['name'])) print('性别是:' + str(i['sex'])) #输出间隔符,方便识别 print('----------------------') return i
def parse_row(self, response, row): i = MycsvItem() #i['url'] = row['url'] #i['name'] = row['name'] #i['description'] = row['description'] i['name'] = row['name'].encode() i['sex'] = row['sex'].endode() print("名字是:" + i['name']) print("性别是:" + i['sex']) print("_________________") return i
def parse_row(self, response, row): i = MycsvItem() # i['url'] = row['url'] # i['name'] = row['name'] # i['description'] = row['description'] i['name'] = row['name'].encode() i['sex'] = row['sex'].encode() print("name:", i['name']) print("sex", i['sex']) print("--------------------") return i
def parse_row(self, response, row): i = MycsvItem() i['name'] = row['name'].encode() i['sex'] = row['sex'].encode() i['addr'] = row['addr'].encode() i['email'] = row['email'].encode() print u"名字是:", i['name'] print u"性别是:", i['sex'] print u"地址是:", i['addr'] print u"邮件是:", i['email'] print "-------------------------------" return i
def parse_row(self, response, row): i = MycsvItem() # i = {} #i['url'] = row['url'] i['name'] = row['name'].encode() i['sex'] = row['sex'].encode() print("name:") print(i['name']) print("sex:") print(i['sex']) print("___________________________") #i['description'] = row['description'] return i
def parse_row(self, response, row): i = MycsvItem() # 提取各行的name这一列的信息 i['name'] = row['name'].encode() # 提取各行的sex这一列的信息 i['sex'] = row['sex'].encode() # 进行信息输出 print("名字是:") print(i['name']) print("性别是:") print(i['sex']) # 输出完一个记录的对应列的信息后,输出一个间隔符,显示起来方便观察 print("--------------------") return i
def parse_row(self, response, row): i = MycsvItem() i['nam'] = row['name'].encode() i['sex'] = row['sex'].encode() print("Name is: ") print(i['nam']) print("Sex is: ") print(i['sex']) print("-------------------------") #i['url'] = row['url'] #i['name'] = row['name'] #i['description'] = row['description'] return i
def parse_row(self, response, row): i = MycsvItem() #i['url'] = row['url'] #i['name'] = row['name'] #i['description'] = row['description'] i['name'] = row['name'] print('name: %s' % i['name']) i['sex'] = row['sex'] print(' sex: %s' % i['sex']) i['addr'] = row['addr'] print('addr: %s' % i['addr']) i['email'] = row['email'] print('email: %s' % i['email']) print("-" * 50) return i