Downloading the feed using feedparser

M

mukesh tiwari

Hello all,
I am trying to download the feed of http://blogs.forrester.com/feed but I am stuck with a problem.
'Wed, 04 Sep 2013 10:47:33 +0000'
200

When I am running this, should not this be 304 ( The content can't be change so fast in a moment or this server is not configured properly ). If I rely on this then whenever I run the code, I will download the content irrespective of content changed or not. Could some one please suggest me how to avoid the duplicate download ?

The below one is working fine so if I try to download again then I will get304 response since no data is changed on server.
304

Thank you
Mukesh Tiwari
 
I

Irmen de Jong

Hello all, I am trying to download the feed of http://blogs.forrester.com/feed but I
am stuck with a problem.

'Wed, 04 Sep 2013 10:47:33 +0000'

200

When I am running this, should not this be 304 ( The content can't be change so fast
in a moment or this server is not configured properly ). If I rely on this then
whenever I run the code, I will download the content irrespective of content changed
or not. Could some one please suggest me how to avoid the duplicate download ?

No it's correct because repeatedly downloading that URL gives me a different etag and
last-modified header in the server's response. Their server is very likely to be
generating the data on the fly every time you retrieve that location. Why do you assume
this can't change so fast? It is very likely not a static file that is being retrieved,
but rather a piece of content that is generated for every request, by their server
application.

The below one is working fine so if I try to download again then I will get 304
response since no data is changed on server.

http, I pressume...........^^^^

But yeah, that url gives the same etag and last-modified header in the response, when
repeatedly downloading it. This is probably a static file that is being updated once in
a while.

Irmen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top