| 12345678910111213141516171819202122232425 |
- # coding=utf-8
- '''
- Created on 2016年4月6日
- @author: ChenHao
- '''
- from pymongo.mongo_client import MongoClient
- from util_common import Constant
- '''
- 将propertyvalue_temp里面的propertyid的str清洗为int
- '''
- cli = MongoClient(Constant.MONGODB_URL)
- db = cli.spider
- rs = db.propertyvalue_temp.find()
- for r in rs:
- r["propretyid"] = int(r["propretyid"])
- db.propertyvalue_temp.save(r)
- cli.close()
|