Using importxml in google script – unable to display content of xpath


This Content is from Stack Overflow. Question asked by casual coding and beers

I would like to get the contents of the beer menu displayed in this website:

but when I use importxml I get a “could not fetch URL warning:

I tried
=importxml(A8, “//*[(@id=’section_269017548′)]//text()”)

=importxml(A8, “//ul[@class=’menu-section-list’]/b/text()”)
(where A8 is the URL of the page)

but I am not having luck..
Any advice on how to get all the

  • included in the ul class=”menu-section-list” ?
    enter image description here

  • Solution

    This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

    This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

    people found this article helpful. What about you?