Skip to content Skip to sidebar Skip to footer

I Can't Grab Specific URL In Search Page

I enter the estate website and searched by name of the city. After that I want to grab Osaka City building URL. In here http://brillia.com/search/?area=27999 There are four of th

Solution 1:

Can you do this by using jQuery? in that case this grab the a href

 $("div h3 a").each(function(){
    var link = $(this).attr("href");
    console.log(link);
 });

here a jsfiddle test


Solution 2:

The parser relies on libxml to extract elements but that page is using html5 heavily, ommiting certain close tags, etc and that isn't really strict xml, so it's struggling to "correct mistakes" by guessing where to close missing tags, returning wrong results.

You need a parser with html5 support like HTML5DOMDocument that extends DOMDocument and should have mostly the same interface.


Post a Comment for "I Can't Grab Specific URL In Search Page"