Re: view page source or save after load
- From: Gabriel Genellina <gagsl-py@xxxxxxxxxxxx>
- Date: Thu, 21 Sep 2006 04:27:03 -0300
At Thursday 21/9/2006 02:26, alex23 wrote:
page = urllib.urlopen('http://some.address')
add .read() at the end
open('saved_page.txt','w').write(page).close()
write() does not return the file object, so this won't work; you have to bind the file to a temporary variable to be able to close it.
Gabriel Genellina
Softlab SRL
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya! http://www.yahoo.com.ar/respuestas
.
- Follow-Ups:
- Re: view page source or save after load
- From: James Stroud
- Re: view page source or save after load
- From: alex23
- Re: view page source or save after load
- References:
- view page source or save after load
- From: zephron2000
- Re: view page source or save after load
- From: alex23
- view page source or save after load
- Prev by Date: Re: Is it possible to change a picture resolution with Python?
- Next by Date: Re: view page source or save after load
- Previous by thread: Re: view page source or save after load
- Next by thread: Re: view page source or save after load
- Index(es):
Relevant Pages
|