From b96aef7e167202d3c6091eab21ff1c5264c8ca2b Mon Sep 17 00:00:00 2001 From: cmdln Date: Wed, 22 Sep 2010 21:33:04 -0400 Subject: [PATCH] Fixed feed date. --- append.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/append.py b/append.py index ed9d9ff..4953c42 100755 --- a/append.py +++ b/append.py @@ -7,6 +7,7 @@ import logging import re from BeautifulSoup import BeautifulSoup import shutil +import time base_urls = { 'itunes' : 'http://traffic.libsyn.com/cmdln', 'other' : 'http://cmdln.evenflow.nl/mp3' } @@ -36,14 +37,15 @@ def __append(feed, suffix, append_fn, args=None): o = open(filename, 'w') firstItem = False try: + updated = time.strftime('%a, %d %b %Y %X +0000', feed.updated) for line in f: if line.find('') != -1 and not firstItem: append_fn(entry, o, suffix, args) firstItem = True - if line.startswith(' '): - line = ' %s' % feed.date - if line.startswith(' '): - line = ' %s' % feed.date + if line.startswith(' '): + line = ' %s\n' % updated + if line.startswith(' '): + line = ' %s\n' % updated o.write(line) finally: f.close()