import me.nekoimi.nekopull.core.NekoPull; import me.nekoimi.nekopull.entity.Request; import me.nekoimi.nekopull.entity.Response; import me.nekoimi.nekopull.handler.SimpleHandler; public class MyCrawler { public static void main(String[] args) { NekoPull nekoPull = new NekoPull(); nekoPull.addHandler(new SimpleHandler() { @Override public void handle(Request request, Response response) { System.out.println(response.getContent()); } }); } } neko.pull.name=MyCrawler neko.pull.startUrl=http://example.com neko.pull.threadCount=5 neko.pull.http.userAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) neko.pull.http.timeout=5000 neko.pull.http.retryCount=3 neko.pull.storage.type=database neko.pull.storage.database.url=jdbc:mysql://localhost:3306/mydb neko.pull.storage.database.username=root neko.pull.storage.database.password=123456 ...


上一篇:
下一篇:
切换中文