Re: Parsing data from URL

2005-04-25 Thread Kartic
The Great 'Harlin Seritt' uttered these words on 4/24/2005 8:24 PM: How can I make sure that I get the actual html data instead of the data from redirected URL? thanks, Harlin Harlin, I am not sure I understand what you are asking but please see if the below mentioned link will help you. I am

Parsing data from URL

2005-04-24 Thread Harlin Seritt
I am trying to do the following: of course website.com is not the actual site import urllib url = 'http://www.website.com/file.shtml' dat = urllib.urlopen(url, 'r').read() print dat When I do so, I get the following data: !DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN HTMLHEAD TITLE405 Method

Re: Parsing data from URL

2005-04-24 Thread could ildg
I think it depends on the server On 24 Apr 2005 17:24:18 -0700, Harlin Seritt [EMAIL PROTECTED] wrote: I am trying to do the following: of course website.com is not the actual site import urllib url = 'http://www.website.com/file.shtml' dat = urllib.urlopen(url, 'r').read() print dat

Re: Parsing data from URL

2005-04-24 Thread R. C. James Harlow
On Monday 25 April 2005 01:24, Harlin Seritt wrote: dat = urllib.urlopen(url, 'r').read() Drop the 'r' - urlopen is posting the 'r' to the server, instead of doing what you mean, opening the file read-only. pgpmZ2zcMs1bO.pgp Description: PGP signature --