simple Question about using BeautifulSoup
Grzegorz Staniak
gstaniak at wp.pl
Wed Aug 20 10:39:36 EDT 2008
On 2008-08-20, Alexnb <alexnbryan at gmail.com> wroted:
> Okay, I have used BeautifulSoup a lot lately, but I am wondering, how do you
> open a local html file?
>
> Usually I do something like this for a url
>
> soup = BeautifulSoup(urllib.urlopen('http://www.website.com')
>
> but the file extension doesn't work. So how do I open one?
Have you tried the local file URL, like "file:///home/user/file.html"?
GS
--
Grzegorz Staniak <gstaniak _at_ wp [dot] pl>
More information about the Python-list
mailing list