title: Using urlopen to open list of urls
body: <p>I have a python script that fetches a webpage and mirrors it. It works fine for one specific page, but I can't get it to work for more than one. I assumed I could put multiple URLs into a list and then feed that to the function, but I get this error: </p>
  
  <pre><code>Traceback (most recent call last):
    File "autowget.py", line 46, in &lt;module&gt;
      getUrl()
    File "autowget.py", line 43, in getUrl
      response = urllib.request.urlopen(url)
    File "/usr/lib/python3.2/urllib/request.py", line 139, in urlopen
      return opener.open(url, data, timeout)
    File "/usr/lib/python3.2/urllib/request.py", line 361, in open
      req.timeout = timeout
  AttributeError: 'tuple' object has no attribute 'timeout'
  </code></pre>
  
  <p>Here's the offending code:</p>
  
  <pre><code>url = ['https://www.example.org/', 'https://www.foo.com/', 'http://bar.com']
  def getUrl(*url):
      response = urllib.request.urlopen(url)
      with urllib.request.urlopen(url) as response, open(file_name, 'wb') as out_file:
          shutil.copyfileobj(response, out_file)
  getUrl()
  </code></pre>
  
  <p>I've exhausted Google trying to find how to open a list with urlopen(). I found one way that sort of works. It takes a <code>.txt</code> document and goes through it line-by-line, feeding each line as a URL, but I'm writing this using Python 3 and for whatever reason <code>twillcommandloop</code> won't import. Plus, that method is unwieldy and requires (supposedly) unnecessary work.</p>
  
  <p>Anyway, any help would be greatly appreciated.</p>