def process_item(self, item, spider):
    client = pymongo.MongoClient(host='127.0.0.1', port=27017)
    db = client['job']
    collection = db['51job']
    item['salary'] = self.clear_salary(salary=item['salary'])
    item['address'] = self.clear_address(address=item['address'])
    item['work_year'] = self.clear_workyear(work_year=item['work_year'])
    collection.insert(dict(item))
    client.close()
    return item
def process_item(self, item, spider):
    client = pymongo.MongoClient(host='127.0.0.1', port=27017)
    db = client['job']
    collection = db['51job']
    item['salary'] = self.clear_salary(salary=item['salary'])
    item['address'] = self.clear_address(address=item['address'])
    item['work_year'] = self.clear_workyear(work_year=item['work_year'])
    collection.insert(dict(item))
    client.close()
    return item