title: Python etag/last modified not working; how to get latest rss
body: <p>I'm trying to write a python program that will grab and display any rss updates since the last time the program was run. I am using <a href="http://packages.python.org/feedparser/index.html" rel="nofollow noreferrer">feedparser</a> and trying to use etags and last modified as described <a href="https://stackoverflow.com/questions/4924781/do-nothing-if-rss-feed-hasnt-changed">here on SO</a> but my test script seems to not be working. </p>
  
  <pre><code>import feedparser
  rsslist=["http://skottieyoung.tumblr.com/rss","http://mrjakeparker.com/feed/"]
  for feed in rsslist:
  print('--------'+feed+'-------')
  d=feedparser.parse(feed)
  print(len(d.entries))
  if (len(d.entries) &gt; 0):
      etag=d.feed.get('etag','')
      modified=d.get('modified',d.get('updated',d.entries[0].get('published','no modified,update or published fields present in rss')))
  
      d2=feedparser.parse(feed,modified)
      if (len(d2.entries) &gt; 0):
          etag2=d2.feed.get('etag','')
          modified2=d2.get('updated',d.entries[0].get('published',''))
  
      if (d2==d): #ideally we would never see this bc etags/last modified would prevent unnecessarily downloading what we all ready have.
          print("Arrg these are the same")
  </code></pre>
  
  <p>I'm honestly not sure if rss/xml technology has changed from the references I've been using online or if there is a problem with my code. </p>
  
  <p>Regardless I'm looking for a best solution to efficiently use rss feeds. As it stands I'm looking to minimize bandwidth waste such as that which is intended by use of last-modified and the etags fields. </p>
  
  <p>Thanks in advance.</p>