BeautifulSoup error
William Xu
william.xwl at gmail.com
Fri Jun 16 07:20:57 EDT 2006
Ben Finney <bignose+hates-spam at benfinney.id.au> writes:
> William Xu <william.xwl at gmail.com> 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 string of bytes according
> to the character encoding specified in the response header fields.
i thought we can read and write to a port, like port in scheme. :-)
[...]
> Get the character encoding specified in the HTTP response, and decode
> the data to Unicode from that encoding.
How can i do this? i'm afraid i can't figure it out in the manual..
--
William
I just uploaded xtoolplaces-1.6. It fixes all bugs but one: It still
coredumps instead of doing something useful. The upstream author's
e-mail address bounces, Redhat doesn't provide it and I never used it.
-- Sven Rudolph <sr1 at os.inf.tu-dresden.de>
More information about the Python-list
mailing list