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 ju

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 -- http://mail.python.org/mailman/listi

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: > > > > import urllib > > url = 'http://www.website.com/file.shtml' > dat = urllib.urlopen(url, 'r').read() > print dat > > When I do so, I get the follo

Parsing data from URL

2005-04-24 Thread Harlin Seritt
I am trying to do the following: 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: 405 Method Not Allowed Method Not Allowed The requested method POST is not allowed for the URL Apache/1.3.27 Se