def process_item(self, item, spider):
    client = pymongo.MongoClient(host='127.0.0.1', port=27017)
    db = client['job']
    collection = db['position']
    item['salary'] = clear_salary(item['salary'])
    item['create_time'] = clear_time(item['create_time'])
    item['educational'] = clean_education(item['educational'], item['body'])
    is_php = clean_name(item['position_name'])
    if (is_php is True):
        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['position']
    item['salary'] = clear_salary(item['salary'])
    item['create_time'] = clear_time(item['create_time'])
    item['educational'] = clean_education(item['educational'], item['body'])
    is_php = clean_name(item['position_name'])
    if (is_php is True):
        collection.insert(dict(item))
    client.close()
    return item