[Rivet] [Fastjet] FastJet "robot" downloads blocked

Gregory Soyez soyez at lpthe.jussieu.fr
Fri Apr 19 14:17:45 BST 2013


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