"Serge Orlov" <[EMAIL PROTECTED]> 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
William Xu wrote:
> Hi, all,
>
> This piece of code used to work well. i guess the error occurs after
> some upgrade.
>
> >>> import urllib
> >>> from BeautifulSoup import BeautifulSoup
> >>> url = 'http://www.google.com'
> >>> port = urllib.urlopen(url).read()
> >>> soup = BeautifulSoup()
> >>> so
Slawomir Nowaczyk <[EMAIL PROTECTED]> writes:
> >>> soup.feed( unicode(port,"iso-8859-1") )
Sure, once you have the encoding name. Visit a different URL, you may
get a different encoding which should be used.
--
\ "I believe in making the world safe for our children, but not |
`\ou
Ben Finney <[EMAIL PROTECTED]> writes:
> William Xu <[EMAIL PROTECTED]> writes:
>
>> >>> import urllib
>> >>> from BeautifulSoup import BeautifulSoup
>> >>> url = 'http://www.google.com'
>> >>> port = urllib.urlopen(url).read()
>
> Gets the data from the HTTP response. (I'm not sure why you call t
On Fri, 16 Jun 2006 15:20:48 +1000
Ben Finney <[EMAIL PROTECTED]> wrote:
#> > >>> soup = BeautifulSoup()
#> > >>> soup.feed(port)
#> > Traceback (most recent call last):
#> > File "", line 1, in ?
#> > File "/usr/lib/python2.3/sgmllib.py", line 94, in feed
#> > self.rawdata = self.rawdata
"Serge Orlov" <[EMAIL PROTECTED]> writes:
[...]
> Upgrading python-beautifulsoup is a good idea, since there were two bug
> fix releases after 3.0.1
I just downloaded latest version 3.0.3 from its homepage, seems it still
has the same problem.
--
William
PL/I -- "the fatal disease" -- belongs
William Xu wrote:
> Hi, all,
>
> This piece of code used to work well. i guess the error occurs after
> some upgrade.
>
> >>> import urllib
> >>> from BeautifulSoup import BeautifulSoup
> >>> url = 'http://www.google.com'
> >>> port = urllib.urlopen(url).read()
> >>> soup = BeautifulSoup()
> >>> so
William Xu <[EMAIL PROTECTED]> writes:
> >>> import urllib
> >>> from BeautifulSoup import BeautifulSoup
> >>> url = 'http://www.google.com'
> >>> port = urllib.urlopen(url).read()
Gets the data from the HTTP response. (I'm not sure why you call this
"port".) The data is HTML text encoded to a st