Try adding a class to scrapy.loader.processors. I found the TakeFirst class and then added
after it
#第二个数据
class TakeSecond(object):
def __call__(self, values):
for i in range(len(values)):
if i == 1 :
if values[i] is not None and values[i] != '':
return values[i]
Try adding a class to scrapy.loader.processors.
after itI found the TakeFirst class and then added
Then import TakeSecond in item.py and use
Then run the result
from scrapy.loader.processors import TakeFirst