why not in python 2.4.3
Carl Banks
invalidemail at aerojockey.com
Sun May 28 15:49:18 EDT 2006
Rocco wrote:
> hi
> I made the upgrade to python 2.4.3 from 2.4.2.
> I want to take from google news some atom feeds with a funtion like
> this
> import urllib2
> def takefeed(url):
> request=urllib2.Request(url)
> request.add_header('User-Agent', 'Mozilla/4.0 (compatible; MSIE 5.5;
> Windows NT')
> opener = urllib2.build_opener()
> data=opener.open(request).read()
> return data
> url='http://news.google.it/?output=rss'
> d=takefeed(url)
> This woks well with python 2.3.5 but does not work with 2.4.3.
> Why?
Define "woks [sic] well". It works fine for me on 2.4.3 (and by "works
fine" I mean it ran without an exception and it returned what appeared
to be RSS data). If you would give us an exception trace it would help
a lot.
Maybe Google's server (or your ISP's) was down. That happens
sometimes.
Carl
More information about the Python-list
mailing list