title: TypeError: can't use a string pattern on a bytes-like object in re.findall()
body: <p>I am trying to learn how to automatically fetch urls from a page. In the following code I am trying to get the title of the webpage:</p>
  
  <pre><code>import urllib.request
  import re
  
  url = "http://www.google.com"
  regex = r'&lt;title&gt;(,+?)&lt;/title&gt;'
  pattern  = re.compile(regex)
  
  with urllib.request.urlopen(url) as response:
     html = response.read()
  
  title = re.findall(pattern, html)
  print(title)
  </code></pre>
  
  <p>And I get this unexpected error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "path\to\file\Crawler.py", line 11, in &lt;module&gt;
      title = re.findall(pattern, html)
    File "C:\Python33\lib\re.py", line 201, in findall
      return _compile(pattern, flags).findall(string)
  TypeError: can't use a string pattern on a bytes-like object
  </code></pre>
  
  <p>What am I doing wrong?</p>