58修改
This commit is contained in:
+5
-4
@@ -166,8 +166,8 @@ class Esf58Crawl extends BaseBatch{
|
||||
def addr = JQueryUtils.selectText(".desc", detailDocument);
|
||||
if(info){
|
||||
if(info.size()>=4){
|
||||
city = info[2].replace("小区","")
|
||||
region = info[3].replace("小区","")
|
||||
city = info[2].replace("小区","").trim()
|
||||
region = info[3].replace("小区","").trim()
|
||||
}
|
||||
}
|
||||
if(!addr){
|
||||
@@ -212,8 +212,8 @@ class Esf58Crawl extends BaseBatch{
|
||||
def saveThirdParty(metadata){
|
||||
DBObject obj = new BasicDBObject();
|
||||
obj.put("district_id", metadata.url);
|
||||
obj.put("city", metadata.city);
|
||||
obj.put("region", metadata.region);
|
||||
obj.put("city", metadata.city.trim());
|
||||
obj.put("region", metadata.region.trim());
|
||||
obj.put("block", metadata.block);
|
||||
obj.put("name", metadata.name);
|
||||
obj.put("s_date", SHORT_DATE);
|
||||
@@ -221,6 +221,7 @@ class Esf58Crawl extends BaseBatch{
|
||||
obj.put("addres", metadata.address);
|
||||
obj.put("avg_price", metadata.avg_price.toInteger());
|
||||
obj.put("c_date", new Date());
|
||||
println obj.toString()
|
||||
thirdPartyColl.save(obj);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user