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

184
Vistas
splash:mouse_click couldn't open pop up window

I'm trying to scrape part-time job information from townwork(A Japanese job information site). To get the address, I want to open a popup window. Then I started to use Splash. Although I could open other links and popups using splash:mouse_click, I couldn't open the desired pop-up window.

Any answer would be greatly appreciated.

The link that I wanted to click. enter image description here

Desired result. enter image description here

Target page URL https://townwork.net/detail/clc_2578209001/joid_Y00BKDF4/

Code

function main(splash, args)
  assert(splash:go(args.url))
  local map = splash:select('#jsi-inflow-target > div > dl:nth-child(3) > dd > p > span > a')

  local bounds = map:bounds()
  local x_dif = bounds.right - bounds.left
  
  assert(map:mouse_click({x=bounds.width/3, y=bounds.height/3}))
  splash:wait(1)
  return {
    html = splash:html(),
    png = splash:png(),
    bounds = bounds
    
  }
end

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I think that the speed at which this popup opens is a cause.

I found another solution other than the open popup page for the sake of the address: getting latitude and longitude from the first page.

def parse(self, response):
  dt_list = response.css('dt')
    for dt in dt_list:
      if dt.css('::text').get == "勤務地":
        a_tag = BeautifulSoup(dt.xpath('./following-sibling::dd').get()).find('a')
        if a_tag is None:
          continue
        item['lat'] = a_tag['data-lat']
        item['lon'] = a_tag['data-lon']
about 4 years ago · Juan Pablo Isaza Denunciar
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