title: Scrapy-splash - does splash:go(url) in lua_script perform GET request again?
body: <p>I'm new to <code>Scrapy-splash</code> and I'm trying to scrape a lazy <code>datatable</code> which is a table with AJAX pagination.</p>
  
  <p>So I need to load the website, wait until <code>JS</code> is executed, get html of the table and then click on the "Next" button on pagination.</p>
  
  <p>My approach works but I'm afraid I'm requesting the website two times. </p>
  
  <p>First time when I yield the <code>SplashRequest</code> and then when <code>lua_script</code> is executed. </p>
  
  <p>Is it true? If yes, how to make it perform request just once?</p>
  
  <pre><code>class JSSpider(scrapy.Spider):
      name = 'js_spider'
      script = """
      function main(splash, args)
          splash:go(args.url)
          splash:wait(0.5)
          local page_one = splash:evaljs("$('#example').html()")
          splash:evaljs("$('#example_next').click()")
          splash:wait(2)
          local page_two = splash:evaljs("$('#example').html()")
          return {page_one=page_one,page_two=page_two}
      end"""
  
      def start_requests(self):
          url = f"""https://datatables.net/examples/server_side/defer_loading.html"""
          yield SplashRequest(url, endpoint='execute',callback=self.parse, args={'wait': 0.5,'lua_source':self.script,'url':url})
  
      def parse(self, response):
          # assert isinstance(response, SplashTextResponse)
          page_one = response.data.get('page_one',None)
          page_one_root = etree.fromstring(page_one, HTMLParser())
          page_two = response.data.get('page_two',None)
          page_two_root = etree.fromstring(page_one, HTMLParser())
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>Also I would like to wait until <code>AJAX</code> is performed better way than just <code>splash:wait(2)</code>. Is it possible to somehow wait until the table changed? Ideally with some timeout.</p>