修改
This commit is contained in:
+9
-7
@@ -195,16 +195,18 @@ class Esf58Crawl extends BaseBatch{
|
|||||||
cityList.each{city, str->
|
cityList.each{city, str->
|
||||||
for(def i=0;i<1;i++){
|
for(def i=0;i<1;i++){
|
||||||
// def city = "福州"
|
// def city = "福州"
|
||||||
def districts = CommonDatautils.findAllDistricts(city, "district", ["city", "region", "name"]);
|
if(citys.contains(city)){
|
||||||
if(districts){
|
def districts = CommonDatautils.findAllDistricts(city, "district", ["city", "region", "name"]);
|
||||||
def arrs = str.split("\\|")
|
if(districts){
|
||||||
def url = "https://"+arrs[0]+".58.com/xiaoqu/"
|
def arrs = str.split("\\|")
|
||||||
distMap.put(city, districts)
|
def url = "https://"+arrs[0]+".58.com/xiaoqu/"
|
||||||
|
distMap.put(city, districts)
|
||||||
|
|
||||||
addCrawlKeys(city);
|
addCrawlKeys(city);
|
||||||
addDetailContent(city, url);
|
addDetailContent(city, url);
|
||||||
|
|
||||||
// Thread.sleep(1000*60*10)
|
// Thread.sleep(1000*60*10)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user