|
@@ -18,7 +18,8 @@ def my_masto_tag(lang, instance, user, tag):
|
18
|
18
|
is_rtl = lang in RTL_LANGS
|
19
|
19
|
title = f'@{user}@{instance} — #{tag}'
|
20
|
20
|
og_image = None
|
21
|
|
- feed = feedparser.parse(f'https://{instance}/@{user}/tagged/{tag}.rss')
|
|
21
|
+ tag_url = f'https://{instance}/@{user}/tagged/{tag}'
|
|
22
|
+ feed = feedparser.parse(f'{tag_url}.rss')
|
22
|
23
|
hashtag = '#' + tag.lower()
|
23
|
24
|
for e in feed['entries']:
|
24
|
25
|
e['date'] = time.strftime('%Y-%m-%d', e['published_parsed'])
|
|
@@ -44,6 +45,6 @@ def my_masto_tag(lang, instance, user, tag):
|
44
|
45
|
e['has_images'] = not not images
|
45
|
46
|
e['videos'] = videos
|
46
|
47
|
e['has_videos'] = not not videos
|
47
|
|
- return render_template('index.html', lang=lang, is_rtl=is_rtl, title=title,
|
|
48
|
+ return render_template('index.html', lang=lang, is_rtl=is_rtl, title=title, tag_url=tag_url,
|
48
|
49
|
og_image=og_image or url_for('static', filename='hashtag.png', _external=True),
|
49
|
50
|
updated_time=int(time.time()), feed=feed)
|