BeautifulSoup HTMLParseError

Zac*_*ack 4 python beautifulsoup web-scraping

Python新手,有一个简单的情境问题:

尝试使用BeautifulSoup来解析一系列页面.

from bs4 import BeautifulSoup
import urllib.request

BeautifulSoup(urllib.request.urlopen('http://bit.ly/'))
Run Code Online (Sandbox Code Playgroud)

追溯 ...

html.parser.HTMLParseError: expected name token at '<!=KN\x01...

使用Python 3.2在64位Windows上运行.

我需要机械化吗?(这将需要Python 2.X)

kin*_*all 24

如果该URL正确,您就会问为什么HTML解析器会在解析MP3文件时抛出错误.我相信这个问题的答案是不言而喻的......