title: Spynner programmatic python browser to download files from cgi file-server: jquery selector for browser.click()?
body: <p>I am trying to use spynner , the stateful programmatic web browser to download files from a cookie protected web / cgi file repository.</p>
  
  <p>Spynner uses jquery like selectors to tell the browser what to click.</p>
  
  <p>I have a link to the file </p>
  
  <pre><code>&lt;a href="index.cgi?page=download&amp;amp;file=%2Fhome%2Fjdataserver%2Fpublic_html%2Fuser_data%2Fcompany%2F.ftpquota" class="ar"&gt;
  </code></pre>
  
  <p>However when I tell spynner to click that link nothing gets downloaded.
  My code is</p>
  
  <pre><code>import spynner
  from spynner import browser
  import pyquery
  import private
  import pynotify
  import time
  
  
  User_File_Area_URL="http://dataserver.com/cgi-bin/index.cgi"
  agent = browser.Browser()
  agent.load("http://dataserver.com/cgi-bin/index.cgi")
  agent.wait(3)
  agent.create_webview(True)
  agent.show()
  agent.fill("input[name=login]",private.uname)
  agent.fill("input[name=password]",private.password)
  agent.click("input[type=submit]")
  #agent.wait(3)
  #Pyquery Browser
  d=pyquery.PyQuery(agent.html)
  print str(d(".td1 .ar"))
  agent.click(".td1 .ar",wait_load=True)
  cookies = agent.get_cookies()
  print cookies
  </code></pre>
  
  <p>The whole element is given below. I have changed server name and other attributes for privacy reasons .</p>
  
  <pre><code>&lt;a href="index.cgi?dir=%2Fhome%2Fjdataserver%2Fpublic_html%2Fuser_data%2Fcompany%2FUntarred" class="ar"&gt;&lt;img src="http://www.dataserver.com/img/efm_v1_6/folder.gif" width="16" height="16" border="0"/&gt; Untarred&lt;/a&gt;&lt;a href="index.cgi?page=download&amp;amp;file=%2Fhome%2Fjdataserver%2Fpublic_html%2Fuser_data%2Fcompany%2F.ftpquota" class="ar"&gt;&lt;img src="http://www.dataserver.com/img/efm_v1_6/download.gif" width="16" height="16" border="0" alt="Download" title="Download"/&gt;&lt;/a&gt;
  </code></pre>