Google Spreadsheet ImportXML error #NA not received any data as a result of XPath queries -
i have problem scraping 1 website - motoallegro
i want title of ads in page
so set formula in google spreadsheet:
=importxml("http://allegro.pl/samochody-149?order=qd&string=primera+gt&search_scope=automotive&department=automotive";"//header/h2/a/span")
this formula return #na error: not received data result of xpath queries
but if try other data same page, example h1 text:
=importxml("http://allegro.pl/samochody-149?order=qd&string=primera+gt&search_scope=automotive&department=automotive";"//h1/span")
the result correct: "primera gt"
i want add, xpath rule - //header/h2/a/span correct. tested on few firefox xpath plugins.
any ideas, why google spreadsheet formula importxml correct xpath rule not return correct data?
google seems strip non-html4-tags <header/>
, <section/>
. use <div id="listing">...</div>
accessing headlines need.
try xpath expression:
//div[@id='listing']//h2/a/span
Comments
Post a Comment