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

176
Views
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 answers
Answer question

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