Lua Scripts are not executing

Posted over 4 years ago by Joel Ibaceta

Post a topic
Un Answered
J
Joel Ibaceta

I have an spider with a Lua script for click a link and wait ... but, when i run my spider using crawlera ... I got a response with the initial html without the changes generated by the Lua script.


This is my Lua Script


 

function main(splash, args)

  assert(splash:go(args.url))

  assert(splash:wait(1))

 

  while not splash:select('.TablaForm3') do

    splash:wait(0.1)

  end

 

  return {

    html = splash:html()

  }

end


And my spider star request method


 

yield SplashRequest(

  url,

  self.parse,

  meta={'nog':nog, 'step': i},

  headers=headers,

  endpoint="execute",

  args={ 'wait': 0.5, 'lua_source': scripts[i] },

  dont_filter=True)




0 Votes


0 Comments

Login to post a comment