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

204
Views
JavaScript Bubbling Event - Web Scraping python and selenium

I'm trying to web scrape this site https://www.parts-catalogs.com/us/demo/#/groups?catalogId=vw&carId=fccabcf290dc6cfdd3d401531d4ad6a8&q=WVWMA83BXWE446629&criteria=10%2aWVWMA83BXWE446629%2131a3cee7 , but I'm having a problem. The site has JavaScript Bubbling Event.

I tried to select my element and use the bubbling event function as JavaScript code, but I get this error: " JavascriptException: Message: SyntaxError: function statement requires a name ".

If anyone has any solution or some code that can help me, I would be grateful!

here is the code:

# 1
driver.get('https://www.parts-catalogs.com/us/demo/#/groups?catalogId=vw&carId=fccabcf290dc6cfdd3d401531d4ad6a8&q=WVWMA83BXWE446629&criteria=10%2aWVWMA83BXWE446629%2131a3cee7')

# 2
div = driver.find_element_by_class_name('_2F3__SgJeuwKjU27Ngd6Pr')
ul = div.find_element_by_tag_name('ul')
element = ul.find_elements_by_tag_name('li')[0]

# 3
js = """
  function(t) {
  if (t.target === t.currentTarget || t.timeStamp >= i || t.timeStamp <= 0 || t.target.ownerDocument !== document) return o.apply(this, arguments)
}
"""

driver.execute_script(js.click(), element)

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!