title: Can't get Python to download webpage source code: "browser version not supported"
body: <p>So I'm trying to write a program that would download the source-code of a webpage in Python 2.7.</p>
  
  <p>The code looks like this:</p>
  
  <pre><code>import urllib2
  url = "https://scrap.tf/stranges/47"
  req = urllib2.Request(url, headers={'User-Agent' : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko) Ubuntu/11.04 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/534.30"}) 
  con = urllib2.urlopen(req)
  data = con.read()
  print data
  
  filename = raw_input("Enter filename here: ") + ".txt"
  in_data = open(filename, "w")
  in_data.write(data)
  in_data.close()
  </code></pre>
  
  <p>However when I open the output file major chunks of the source code are missing and instead there's a message saying that this version of the browser is unsupported and I should get another one. </p>
  
  <p>Is there a way I can avoid this problem?</p>