BeautifulSoup error
William
william.xwl at gmail.com
Fri Jun 16 14:34:34 EDT 2006
"Serge Orlov" <Serge.Orlov at gmail.com> writes:
[...]
> Look at the traceback: you're not calling BeautifulSoup module! In
> fact, there is no feed method in the current BeautifulSoup
> documentation. Maybe it used to work well, but now it's definitely
> going to fail. As I understand documentation you need to write
>
> soup = BeautifulSoup(port)
Ah, yes ! Things change ! :-)
BeautifulSoup feed() method used to exist before 3.0.0, and was left
over to SGMLParser later. As explained in the changlog,
http://www.crummy.com/software/BeautifulSoup/CHANGELOG.html
Release 3.0.0 (2006/05/28), "Who would not give all else for two p"
Beautiful Soup no longer implements a feed method. You need to pass a
string or a filehandle into the soup constructor, not with feed after
the soup has been created. There is still a feed method, but it's the
feed method implemented by SGMLParser and calling it will bypass
Beautiful Soup and cause problems.
Thanks for all the help !
--
William
Thrashing is just virtual crashing.
More information about the Python-list
mailing list