title: BeautifulSoup utf-8 decoding error
body: <p>I'm trying to extract movie information from a website using BeautifulSoup 4. The relevant part of the code is this:</p>
  
  <pre><code>from bs4 import BeautifulSoup as Soup
  import requests
  
  url = r'http://www.the-numbers.com/movies/1997/ASGOD.php' #is passed relevant url
  r = requests.get(url)
  soup = Soup(r.content, from_encoding = r.encoding) 
  </code></pre>
  
  <p>Although it's working fine in a bunch of the website's pages just like it, on this particular one it returns the error message:</p>
  
  <pre><code>UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 0: invalid start byte
  </code></pre>
  
  <p>At least that's usually the error. It also occasionally (and seemingly randomly) gives me a slightly different area, complaining about a different decode bit in a different position (eg 0xea in position 229).</p>
  
  <p>The problem page is <a href="http://www.the-numbers.com/movies/1997/ASGOD.php" rel="nofollow">here</a>. An example of one that looks very similar but DOES work is <a href="http://www.the-numbers.com/movies/1997/SCRM2.php" rel="nofollow">here</a>.</p>
  
  <p>I assume that there is some kind of encoding error on that page that throws BeautifulSoup for a loop, so I guess my question is whether there's some way to fix that error?</p>
  
  <p>Thanks a lot,
  Alex</p>