beutifulsoup

Kay Schluehr kay.schluehr at gmx.net
Thu Oct 30 13:38:34 EDT 2008


On 30 Okt., 18:28, luca72 <lucabe... at libero.it> wrote:
> hello
> Another stupit question instead of use
> sito = urllib.urlopen('http://www.prova.com/')
> esamino = BeautifulSoup(sito)
>
> i do
>  sito = urllib.urlopen('http://onlygame.helloweb.eu/')
>  file_sito = open('sito.html', 'wb')
>  for line in sito :
>      file_sito.write(line)
>  file_sito.close()
>
> how can i pass the file sito.html to beautifulsoup?
>
> Regards
>
> Luca

download = urllib.urlopen("http://www.fiber-space.de/downloads/
downloads.html")
BeautifulSoup(download.read())

Ciao



More information about the Python-list mailing list