How to get hover data (ajax) using any php crawler

I am viewing the data of one website. I can do all the content on the page. However, some data on the page appears after hovering over some icons and is shown as hints. Therefore, I also require data. Is this possible with any seeker.

I am using PHP and simplehtmldom for a parsing / traversal page.


source to share

4 answers

Hover data cannot be received by any scanner.

The crawlers scan the web page and get the whole data (HTML page source). This is the view that we can view as soon as we click on the URL. Hover your mouse over the HTML attribute on the ie page manually. And currently no crawlers perform actions to freeze and get this data according to my knowledge. Thus, it is not possible to obtain error data with scanners.



One possibility is to execute the javascript using a javascript interpreter (quickly looked at this and it might be what you want) and then write some additional javascript code to trigger hover events on the desired elements.

If the page uses AJAX to fill in the required fields, it might be easier to use a tool like Firebug to look at the AJAX calls and recreate them in your code to fill in the missing DOM elements.

Another alternative is to rethink the crawler and perhaps use a browser based crawler. This is something I don't have much experience with, but I'm sure others have done it.



I suggest looking at Selenium . I have used it many times and it can definitely doonmouseover



You cannot get dynamic source code that requires interaction with simple php curl. However, with PhantomJS you can achieve a hover state as well as grab future ajax page load. It has a learning curve and you need to install it with node.js on your server if you have rights.

With PhantomJS you will be able to get onmouseover or dynamic ajax content as it is a mute web kit browser that visits pages with your commands.