Quantcast
Viewing all articles
Browse latest Browse all 2

Answer by Julien Genestoux for Python/Feedparser: reading RSS feed fails

So, this feed yields a 405 error when the client making the request does not use a User-Agent. Try this:

$ curl 'http://www.propertyguru.com.sg/rss' -H 'User-Agent: hum' -o /dev/null -D- -sHTTP/1.1 200 OKServer: nginxDate: Thu, 21 May 2015 15:48:44 GMTContent-Type: application/xml; charset=utf-8Content-Length: 24616Connection: keep-aliveVary: Accept-EncodingCache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0Expires: Thu, 19 Nov 1981 08:52:00 GMTPragma: no-cacheVary: Accept-Encoding

While without the UA, you get:

$ curl 'http://www.propertyguru.com.sg/rss' -o /dev/null -D- -sHTTP/1.1 405 Not AllowedServer: nginxDate: Thu, 21 May 2015 15:49:20 GMTContent-Type: text/htmlTransfer-Encoding: chunkedConnection: keep-aliveVary: Accept-EncodingCache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0Expires: Thu, 19 Nov 1981 08:52:00 GMTPragma: no-cacheVary: Accept-Encoding

Viewing all articles
Browse latest Browse all 2

Trending Articles