The code looks like this:
<script async="" id="__NEXT_PAGE__/restaurants" src="/_next/static/~k5VPZk5KBtLKJOP7fLbR/pages/restaurants.js"></script>
<script async="" id="__NEXT_PAGE__/_app" src="/_next/static/~k5VPZk5KBtLKJOP7fLbR/pages/_app.js"></script>
<script async="" src="/_next/static/chunks/146.5cc25d7743407960833f.js"></script>
<script src="/_next/static/runtime/webpack-562f11f96da3918c3d37.js" async=""></script>
<script src="/_next/static/chunks/styles.4fc2149595e9293ccd52.js" async=""></script>
<script src="/_next/static/chunks/styles.4fc2149595e9293ccd52.js" async=""></script>
I used
webdriver.Chrome().find_element_by_id("NEXT_PAGE/restaurants").get_attribute("innerHtml") and
webdriver.Chrome().find_element_by_xpath("//script[@src='/_next/static/chunks/136.ff85cd2297a8e5bf9619.js']").get_attribute("innerHtml")
but they returned None.
I am not really sure if there is text inside the tag btw. This is the page: https://food.grab.com/ph/en/restaurants
I am trying to fetch latitude and longitude for restaurants on the pages after pressing 'load more' button. This info is available in tag with id = 'NEXT_DATA' for first 16 restaurants but beyond that it seems to be hidden somewhere. I know python but not javascript.