Using Python 2.1 to download asp www pages

Zugz zugz.public at DEL-ete-MEbtinternet.com
Thu Jan 17 16:54:51 EST 2002


"Hamish Lawson" <hamish_lawson at yahoo.co.uk> wrote in message
news:915a998f.0201070320.1ae5e57c at posting.google.com...
> Zugz wrote:
>
> > I've recently written some Python code to extract some details about
posting
> > frequency etc from a board I use regularly.
> >
> > I used IE5.5's Save As to give me some pages to work on offline.
> >
> > I would now like to automate the whole process by downloading all the
> > relevant pages or maybe even just accessing them direct.
>
> As others have mentioned, it could be tricky handling redirects in the
> various guises in which they can come, given that urllib.urlopen is
> not a mini-browser capable of interpreting the retrieved web page.
> Therefore an alternative approach may be to use an actual browser, say
> IE, and drive it via COM from Python. For this you will need the
> win32all library. If you are using ActivePython, you should have it
> already. Otherwise you can get it from:
> Hamish Lawson

Hi Hamish,

Thanks for the suggestion. I eventually cracked by returning the cookies
required.
See the solution here:
http://www.zugz.btinternet.co.uk/python.htm
Wish I could claim credit though :(
Regards,
Zugz.





More information about the Python-list mailing list