微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Scrapy Splash Button 不会被点击

如何解决Scrapy Splash Button 不会被点击

数据猎人,你好,我正在尝试从“job.ch”中抓取数据,我向空字段传递了两个参数,如下面的代码所示,但按钮仍然始终无法点击,即使我尝试使用所有方式 send_key(),send_key() 也有 submit() 而不是 click() 。

function main(splash,args)
 splash.private_mode_enabled = false
 assert(splash:go(args.url))
 assert(splash:wait(3))

 input_job = assert(splash:select("#synonym-typeahead-text-field"))
 input_job:send_text("software developer")
 input_region = assert(splash:select("#location-typeahead-text-field"))
 input_region:send_text("Region of Fribourg")
 assert(splash:wait(3))
 btn = assert(splash:select("span.sc-fzqNJr.StateButton__ButtonContentContainer-sc-7p394w-0.jXVtAy"))
 btn:mouse_click()
 assert(splash:wait(5))
 return {
  html = splash:HTML(),png = splash:png(),har = splash:har(),}
end

the result still always like that

代码

source code

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。