Commit e8c8b441 authored by Alona S's avatar Alona S

виправлення зауважень до pull-request #354

parent 47dc3883
......@@ -43,8 +43,6 @@ def getUrl(ch):
def optsForCh(ch):
return {'url': getUrl(ch), 'title': contents[ch]['title']}
print contents
def file_get_contents(filename):
with open(filename) as f:
......@@ -47,7 +47,7 @@ def rss_generate(data, site_name):
# itemlist зберігає оновлення в порядку від новіших до старіших;
itemlist = []
for chapter, info in data.iteritems():
for chapter, info in data.items():
day, month, year = info['date'].split('.')
d =, int(month), int(day))
itemlist.append((d, chapter))
......@@ -56,7 +56,7 @@ def rss_generate(data, site_name):
with open('public_html/rss.xml', 'w') as f:
pub_date = datetime.datetime.utcnow().strftime('%a, %d %b %Y %H:%M:%S +0000')
pub_date = itemlist[0][0].strftime('%a, %d %b %Y 00:00:00 +0300')
f.write(rss_start % (site_name, pub_date))
for d, chapter in itemlist:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment