Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

348
Vistas
Scrapy Splash Lua Script not rendering JavaScript

I'm having trouble clicking Load More button on the bottom of https://cointelegraph.com/tags/ethereum website. I am able to get 15 articles from the first page, but that's about it. My Lua script looks like this:

function main(splash, args)
  splash.images_enabled = true
  assert(splash:go(args.url))
  assert(splash:wait(5))
  for i = 0,5,1
  do
    input_box = assert(splash:select("button[class='btn posts-listing__more-btn']"))
    assert(splash:wait(1))
    input_box:mouse_click()
    assert(splash:wait(5))
  end
  splash:set_viewport_full()
  return {
    png = splash:png(),
    html = splash:html(),
    har = splash:har(),
  }
end

What I also tried, is executing this code inside Lua Splash script:

assert(splash:runjs('document.querySelectorAll("button.btn.posts-listing__more-btn")[0].click()'))

What's interesting is that document.querySelectorAll("button.btn.posts-listing__more-btn")[0].click() executed inside Chrome console, clicks on the button just fine. I am aware at this point that the website in question enforces some measures to prevent scraping, or JavaScript execution, but I can't figure out what. I also tried launching splash with --disable-private-mode, enabling settings like Flash, Local storage, HTML5, and anything else I found to be possible solution but nothing works. Initially my spider was scraping https://cointelegraph.com/search?query=ethereum but that URL doesn't even load the articles with Splash any longer. Any hints, or help is greatly appreciated! Using Splash version: 3.5.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda