因毕设需要做数据集,学习爬虫。
相关代码:https://github.com/CrisJk/Agriculture-KnowledgeGraph-Data/blob/master/wikidataCrawler/spiders/getRelationList.py
1.目前遇到问题,中文description无法返回。
0.
print(response.body)
解释:xpath是从网页返回内容里边去提取的,网页返回的content和浏览器的element可能会有差异
1.查找是不是pipelines.py出问题。
def process_item(self, item, spider):
if(item.get('link') is not None):
line = json