title: Get webpage contents with Python?
body: <p>I'm using Python 3.1, if that helps.</p>
  
  <p>Anyways, I'm trying to get the contents of <a href="http://services.runescape.com/m=hiscore/ranking?table=0&amp;category_type=0&amp;time_filter=0&amp;date=1519066080774&amp;user=zezima" rel="noreferrer">this</a> webpage. I Googled for a little bit and tried different things, but they didn't work. I'm guessing that this should be an easy task, but...I can't get it. :/.</p>
  
  <p>Results of urllib, urllib2:</p>
  
  <pre><code>&gt;&gt;&gt; import urllib2
  Traceback (most recent call last):
    File "&lt;pyshell#0&gt;", line 1, in &lt;module&gt;
      import urllib2
  ImportError: No module named urllib2
  &gt;&gt;&gt; import urllib
  &gt;&gt;&gt; urllib.urlopen("http://www.python.org")
  Traceback (most recent call last):
    File "&lt;pyshell#2&gt;", line 1, in &lt;module&gt;
      urllib.urlopen("http://www.python.org")
  AttributeError: 'module' object has no attribute 'urlopen'
  &gt;&gt;&gt; 
  </code></pre>
  
  <h1>Python 3 solution</h1>
  
  <p>Thank you, Jason. :D.</p>
  
  <pre><code>import urllib.request
  page = urllib.request.urlopen('http://services.runescape.com/m=hiscore/ranking?table=0&amp;category_type=0&amp;time_filter=0&amp;date=1519066080774&amp;user=zezima')
  print(page.read())
  </code></pre>