Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

177
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda