summary refs log tree commit diff
path: root/app.py
diff options
context:
space:
mode:
Diffstat (limited to 'app.py')
-rw-r--r--app.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/app.py b/app.py
index c60a4bd..fc224ba 100644
--- a/app.py
+++ b/app.py
@@ -10,6 +10,7 @@ from flask import Flask, abort, render_template
 from functools import cache
 import feedparser
 import multiprocessing
+import time
 
 mp = multiprocessing.get_context('spawn')
 parse = lambda l: bs(urllib.request.urlopen(l), 'html.parser')
@@ -63,8 +64,7 @@ def random(topic):
     link = 'https://arxiv.org/abs/'+paper    
     feed = feedparser.parse(f'http://export.arxiv.org/api/query?id_list={paper}')
     entry = feed['entries'][0]
-
-    return render_template('topic.html', description=entry['description'], title=entry['title'], link=link)
+    return render_template('topic.html', description=entry['description'], title=entry['title'], link=link, authors=entry['authors'], published=time.strftime('%d %b %Y', entry['published_parsed']))
 
 @app.route('/')
 def index():