Handle feeds with pubDates in the future
This commit is contained in:
parent
0846a4d170
commit
7326419aeb
@ -75,9 +75,11 @@ def spiderFeed(feed):
|
|||||||
|
|
||||||
out = filename(cache, entry.id)
|
out = filename(cache, entry.id)
|
||||||
|
|
||||||
|
mtime = None
|
||||||
if entry.has_key('updated_parsed'):
|
if entry.has_key('updated_parsed'):
|
||||||
mtime = calendar.timegm(entry.updated_parsed)
|
mtime = calendar.timegm(entry.updated_parsed)
|
||||||
else:
|
if mtime > time.time(): mtime = None
|
||||||
|
if not mtime:
|
||||||
try:
|
try:
|
||||||
mtime = os.stat(out).st_mtime
|
mtime = os.stat(out).st_mtime
|
||||||
except:
|
except:
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
<dt>Last updated:</dt>
|
<dt>Last updated:</dt>
|
||||||
<dd><span class="date" title="GMT"><xsl:value-of select="atom:updated/@planet:format"/></span></dd>
|
<dd><span class="date" title="GMT"><xsl:value-of select="atom:updated/@planet:format"/></span></dd>
|
||||||
<dt>Powered by:</dt>
|
<dt>Powered by:</dt>
|
||||||
<dd><a href="http://intertwingly.net/code/planet/"><img src="images/planet.png" width="80" height="15" alt="Planet" border="0" /></a></dd>
|
<dd><a href="http://intertwingly.net/code/venus/"><img src="images/planet.png" width="80" height="15" alt="Planet" border="0" /></a></dd>
|
||||||
<dt>Export:</dt>
|
<dt>Export:</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<ul>
|
<ul>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user