h8743
V2EX  ›  Java

webmagic 问题

  •  
  •   h8743 · May 5, 2019 · 1912 views
    This topic created in 2592 days ago, the information mentioned may be changed or developed.

    Spider.create(new PageProcessor()) .addUrl("https://wh.58.com/ershoufang/0/") .addPipeline(propertyDaoPipeLine) .thread(1) .setExitWhenComplete(true) .runAsync();

    如果我想一直循环爬取比如 58 的这个 https://wh.58.com/ershoufang/0/ 地址的话,是不是只需要

    @Override
    public void process(Page page) {
    	do something...
    	page.addTargetRequests("https://wh.58.com/ershoufang/0/");
    }
    这样就行了?
    
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   950 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 19:52 · PVG 03:52 · LAX 12:52 · JFK 15:52
    ♥ Do have faith in what you're doing.