Skip to content

jovezhao/area-code-spider

Repository files navigation

基于jsoup开发的爬取国家统计局行政区划信息

package com.zhaofujun.spider;

import com.zhaofujun.spider.engine.Spider;
import com.zhaofujun.spider.task.*;

import java.io.IOException;
import java.util.List;

public class SpiderTask {
    public static void main(String[] args) throws InterruptedException, IOException {
        Spider spider = new Spider();
        spider.addTask(new ProvincePageTask("http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/2020/"));
//        spider.addTask(new CityPageTask("http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/2020/51.html"));
//        spider.addTask(new CountyPageTask("http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/2020/51/5109.html"));
//        spider.addTask(new TownPageTask("http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/2020/51/09/510904.html"));
        spider.execute();
//        List<AreaCode> areaCodes = AreaCodeDataStorage.getAreaCodes();
        System.out.println("完成!");
    }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages