How to add ( integrate ) crawljax with crawler4j?

2019-08-27 01:24发布

I am working on web crawler which fetch data form website using crawler4j and everything goes well but the main problem is with ajax-based events . So, I found crawljax library does this matter but I couldn't where and when to use it .

When have I use it ( I mean work sequences )?

  • before fetching page using crawler4j.

Or

  • after fetching page using crawler4j.

Or

  • have I use url coming using crawler4j and use it to fetch Ajax data (page) using crawljax.

1条回答
贼婆χ
2楼-- · 2019-08-27 02:06

The library crawljax is basically a crawler for its own purpose. Integration into crawler4j requires a lot of manual effort on your side.

I recommend, that you use a combination of Selenium and/or CasperJS and/or PhantomJS in front of crawler4j, i.e. you could run the JavaScript engine as a Proxy in front of crawler4j. However, this will slow down the performance of your web-crawleer

查看更多
登录 后发表回答