Fix some twitter feeds not working.

This commit is contained in:
pluja 2020-11-10 14:34:48 +01:00
parent 85c24975e0
commit b2c3287144
2 changed files with 2 additions and 3 deletions

View File

@ -9,7 +9,7 @@
<i class="share square outline icon"></i>
</span></a>
</div>
<div class="header" id="author"><a href="{{url_for('u', username=post.op.replace('@',''))}}">{{ post.op }}</a></div>
<div class="header" id="author"><a href="{{url_for('/', username=post.op.replace('@',''))}}">{{ post.op }}</a></div>
<div class="meta">
<span class="category" id="time"><i class="clock icon"></i> {{post.date}} </span>
{% if post.isPinned %}

View File

@ -38,13 +38,12 @@ def get_feed(usernames, daysMaxOld=10, includeRT=True):
else:
userFeed.append(tweet)
else:
userFeed.append(feed)
userFeed+=feed
try:
for uf in userFeed:
if uf == 'emptyFeed':
userFeed.remove(uf)
userFeed.sort(key=lambda item:item['timeStamp'], reverse=True)
#userFeed.sort(key=lambda x: datetime.datetime.strptime(x['timeStamp'], '%Y-%m-%d %H:%M:%S'), reverse=True)
except:
return userFeed
return userFeed