Re: How to read webpage

2009-08-02 Thread catafest
Maybe your python2.5 not working good!? But, I use python 2.6 , and i use this for your problem: import urllib html = urllib.urlopen("http://www.rediff.com/";).read() print html If you want use authenticate then... You make working urllib2 and use this >>>auth = urllib2.Request(auth_uri, authreq_d

Re: How to read webpage

2009-08-01 Thread James Matthews
Check your connection to the internet. On Sat, Aug 1, 2009 at 6:43 PM, Marcus Wanner wrote: > On 8/1/2009 11:31 AM, Jon Clements wrote: > >> On 1 Aug, 14:52, MRAB wrote: >> >>> tarun wrote: >>> Dear All, I want to read a webpage and copy the contents of it in word file. I tried t

Re: How to read webpage

2009-08-01 Thread Marcus Wanner
On 8/1/2009 11:31 AM, Jon Clements wrote: On 1 Aug, 14:52, MRAB wrote: tarun wrote: Dear All, I want to read a webpage and copy the contents of it in word file. I tried to write following code: import urllib2 urllib2.urlopen("http://www.rediff.com/";) *Error:-* urllib2.urlopen("http://www.

Re: How to read webpage

2009-08-01 Thread Jon Clements
On 1 Aug, 14:52, MRAB wrote: > tarun wrote: > > Dear All, > > I want to read a webpage and copy the contents of it in word file. I > > tried to write following code: > > > import urllib2 > > urllib2.urlopen("http://www.rediff.com/";) > > > *Error:-* > > >     urllib2.urlopen("http://www.icicibank.

Re: How to read webpage

2009-08-01 Thread koranthala
On Aug 1, 6:52 pm, MRAB wrote: > tarun wrote: > > Dear All, > > I want to read a webpage and copy the contents of it in word file. I > > tried to write following code: > > > import urllib2 > > urllib2.urlopen("http://www.rediff.com/";) > > > *Error:-* > > >     urllib2.urlopen("http://www.iciciban

Re: How to read webpage

2009-08-01 Thread MRAB
tarun wrote: Dear All, I want to read a webpage and copy the contents of it in word file. I tried to write following code: import urllib2 urllib2.urlopen("http://www.rediff.com/";) *Error:-* urllib2.urlopen("http://www.icicibank.com/";) File "C:\Python25\lib\urllib2.py", line 121, in u

How to read webpage

2009-08-01 Thread tarun
Dear All,I want to read a webpage and copy the contents of it in word file. I tried to write following code: import urllib2 urllib2.urlopen("http://www.rediff .com/") *Error:-* urllib2.urlopen("http://www.icicibank.com/";) File "C:\Python25\lib\urllib2.py", line 121