|
[Rivet] [Fastjet] FastJet "robot" downloads blockedFrank Siegert frank.siegert at cern.chFri Apr 19 14:22:39 BST 2013
Hi Gregory, thanks, I can confirm that this is also working for me with this change. I wonder though why the Accept header is necessary: Shouldn't the server assume the client takes any format if it doesn't specify an accept header? Cheers, Frank On 19 April 2013 15:17, Gregory Soyez <soyez at lpthe.jussieu.fr> wrote: > Hi all, > > The solution seems to be to replace > > hreq = urllib2.urlopen(url) > > by > > request = urllib2.Request(url, headers={"Accept" : "text/html"}) > hreq = urllib2.urlopen(request) > > as it is indicated e.g. here > > http://stackoverflow.com/questions/385262/how-do-i-send-a-custom-header-with-urllib2-in-a-http-request > > At the very least, it works at my end. > > Cheers, > Gregory >
More information about the Rivet mailing list |