@@ -542,16 +542,16 @@
|
|||||||
<artifactId>aliyun-java-sdk-address-purification</artifactId>
|
<artifactId>aliyun-java-sdk-address-purification</artifactId>
|
||||||
<version>1.0.1</version>
|
<version>1.0.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- <dependency>-->
|
<dependency>
|
||||||
<!-- <groupId>com.aliyun</groupId>-->
|
<groupId>com.aliyun</groupId>
|
||||||
<!-- <artifactId>aliyun-java-sdk-core</artifactId>-->
|
<artifactId>aliyun-java-sdk-core</artifactId>
|
||||||
<!-- <version>4.5.9</version>-->
|
<version>4.5.9</version>
|
||||||
<!-- </dependency>-->
|
</dependency>
|
||||||
<!-- <dependency>-->
|
<dependency>
|
||||||
<!-- <groupId>com.alibaba</groupId>-->
|
<groupId>com.alibaba</groupId>
|
||||||
<!-- <artifactId>fastjson</artifactId>-->
|
<artifactId>fastjson</artifactId>
|
||||||
<!-- <version>1.2.83</version>-->
|
<version>1.2.83</version>
|
||||||
<!-- </dependency>-->
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|||||||
+14
-13
@@ -1,6 +1,7 @@
|
|||||||
package com.fangjia.script.gj.village
|
package com.fangjia.script.gj.village
|
||||||
|
|
||||||
import com.fangjia.core.util.HttpRequest
|
import com.fangjia.core.util.HttpRequest
|
||||||
|
import com.fangjia.script.gj.village.ailiyun.SignatureUtils
|
||||||
import com.fangjia.script.util.CosineSimilarAlgorithm
|
import com.fangjia.script.util.CosineSimilarAlgorithm
|
||||||
import com.fangjia.script.util.ExcelUtils
|
import com.fangjia.script.util.ExcelUtils
|
||||||
import com.fangjia.script.util.MongoUtils
|
import com.fangjia.script.util.MongoUtils
|
||||||
@@ -61,19 +62,19 @@ def filePath = "D:\\
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// def retMap = SignatureUtils.getBaiduAddressStrc(row['A'])
|
def retMap = SignatureUtils.getAliAddressStrc(row['A'])
|
||||||
// println row['A'] +" " + retMap.toString()
|
println row['A'] +" " + retMap.toString()
|
||||||
// if(retMap){
|
if(retMap){
|
||||||
// row['Y'] = retMap.prov
|
row['Y'] = retMap.prov
|
||||||
// row['Z'] = retMap.city
|
row['Z'] = retMap.city
|
||||||
// row['AA'] = retMap.district
|
row['AA'] = retMap.district
|
||||||
// row['AB'] = retMap.town
|
row['AB'] = retMap.town
|
||||||
// row['AC'] = retMap.devzone
|
row['AC'] = retMap.devzone
|
||||||
// row['AD'] = retMap.road
|
row['AD'] = retMap.road
|
||||||
// row['AE'] = retMap.roadno
|
row['AE'] = retMap.roadno
|
||||||
// row['AF'] = retMap.poi
|
row['AF'] = retMap.poi
|
||||||
// row['AG'] = retMap.subpoi
|
row['AG'] = retMap.subpoi
|
||||||
// }
|
}
|
||||||
// })
|
// })
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -146,7 +146,7 @@ public class SignatureUtils {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
public static def getBaiduAddressStrc(def address) {
|
public static def getAliAddressStrc(def address) {
|
||||||
DefaultProfile defaultProfile = DefaultProfile.getProfile(
|
DefaultProfile defaultProfile = DefaultProfile.getProfile(
|
||||||
"cn-hangzhou",
|
"cn-hangzhou",
|
||||||
Config.accessKey,
|
Config.accessKey,
|
||||||
|
|||||||
+4
-8
@@ -23,8 +23,8 @@ class DataStat {
|
|||||||
// for(def city :citys){
|
// for(def city :citys){
|
||||||
// println city
|
// println city
|
||||||
// }
|
// }
|
||||||
task.run();
|
// task.run();
|
||||||
// task.stat()
|
task.stat()
|
||||||
|
|
||||||
// def citys = ["福州", "厦门", "泉州", "莆田", "宁德", "三明", "龙岩", "南平", "漳州"]
|
// def citys = ["福州", "厦门", "泉州", "莆田", "宁德", "三明", "龙岩", "南平", "漳州"]
|
||||||
// def rets = []
|
// def rets = []
|
||||||
@@ -76,12 +76,8 @@ class DataStat {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def stat(){
|
def stat(){
|
||||||
def dates = [201810,201811,201812,201901,201902,201903,201904,201905,201906,201907,201908,201909]
|
def dates = [202301,202302,202303,202304,202305,202306,202307,202308,202309,202310,202311,202401]
|
||||||
def sources = ["时间","房估估","诸葛找房","安居客","搜房","中原地产","赶集",
|
def sources = ["时间","我爱我家","兔博士","吉屋","贝壳找房","乐有家","365淘房","诸葛找房","链家","Q房","麦田","中原地产","安居客","搜房","C21","城市房产","幸福里"]
|
||||||
"链家","兔博士","城市房产","贝壳找房","Q房","乐有家",
|
|
||||||
"房探","房多多","小资家","我爱我家","麦田","房途",
|
|
||||||
"C21","乐居","房产超市","58同城"]
|
|
||||||
|
|
||||||
// crawlCount(dates,sources);
|
// crawlCount(dates,sources);
|
||||||
matchCount(dates,sources);
|
matchCount(dates,sources);
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -12,10 +12,10 @@ class TestCrawlTotalCount {
|
|||||||
task.run();
|
task.run();
|
||||||
}
|
}
|
||||||
def run(){
|
def run(){
|
||||||
def sources = ["房估估","诸葛找房","安居客","搜房","中原地产","赶集","链家","兔博士","城市房产","贝壳找房","Q房","Q房(新)","中原地产(新)","乐有家","乐有家(新)","房探","房多多","小资家","我爱我家","麦田","房途","C21","乐居","房产超市","58同城","365淘房","吉屋"]
|
def sources = ["房估估","诸葛找房","安居客","搜房","中原地产","赶集","链家","兔博士","城市房产","贝壳找房","Q房","Q房(新)","中原地产(新)","乐有家","乐有家(新)","房探","房多多","小资家","我爱我家","麦田","房途","C21","乐居","房产超市","58同城","365淘房","吉屋","幸福里"]
|
||||||
for(def source :sources){
|
for(def source :sources){
|
||||||
def count1 = findTotalCount(source, 202302);
|
def count1 = findTotalCount(source, 202307);
|
||||||
def count2 = findTotalCount(source, 202303);
|
def count2 = findTotalCount(source, 202401);
|
||||||
println source +" "+count1 +" "+count2
|
println source +" "+count1 +" "+count2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user