How to add ( integrate ) crawljax with crawler4j?

a 夏天 提交于 2019-12-11 16:38:59

问题


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:


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



来源:https://stackoverflow.com/questions/55010898/how-to-add-integrate-crawljax-with-crawler4j

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!