0
votes

I'm trying to Import a field that helps indicate if a restaurant is currently accepting Online Orders or not.

=INDEX(IMPORTXML("https://www.doordash.com/store/yolk-test-kitchen-chicago-395338/en-US/?pickup=true","//div[@class='sc-cmIlrE bzKTjf']"),1)

I'm not sure why, but I think the data I'm looking for is possibly hidden due to javascript? Is there any way for me to retrieve this still with google sheets?

enter image description here

1
It seems that the value you want to retrieve is shown by Javascript. And also, it seems that the value is retrieved by the fetch of POST request, and also, it seems that the cookie is used for requesting. So unfortunately, I think that, in the current stage, IMPORTXML cannot retrieve the value you want to retrieve. If the site has the API, it might be useful. But I'm not sure about it. I apologize for this.Tanaike

1 Answers

2
votes

IMPORTXML Imports data from any of various structured data types including XML, HTML, CSV, TSV, and RSS and ATOM XML feeds.

The data you are trying to import is loaded by script, therefore is not retrievable by IMPORTXML

I have tried to use the fetch(url) method from apps script and the page did not return the information you require.

If you go to Chrome Dev Tools and disable javascript you will see after reloading the page that no information is shown, that means that the entire page is loaded via script. You can do it by following Disable JavaScript With Chrome DevTools