Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

253
Views
Selenium Python: ¿Cómo obtener datos de texto/html de la etiqueta <script> con un archivo javascript de una página web?

El código se ve así:

 <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>

solía

webdriver.Chrome().find_element_by_id(" NEXT_PAGE /restaurants").get_attribute("innerHtml") y

webdriver.Chrome().find_element_by_xpath("//script[@src='/_next/static/chunks/136.ff85cd2297a8e5bf9619.js']").get_attribute("innerHtml")

pero no devolvieron ninguno .

No estoy muy seguro de si hay texto dentro de la etiqueta por cierto. Esta es la página: https://food.grab.com/ph/en/restaurants

Estoy tratando de obtener la latitud y la longitud de los restaurantes en las páginas después de presionar el botón 'cargar más'. Esta información está disponible en la etiqueta con id = ' NEXT_DATA ' para los primeros 16 restaurantes, pero más allá de eso, parece estar oculta en alguna parte. Conozco python pero no javascript.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!