Connect multiword terms with underscore instead of splitting the words into separate hashtags to fix #17

This commit is contained in:
Steinar Bang
2020-06-24 20:54:10 +01:00
parent 37aedd9e56
commit f804a5ea57

View File

@ -65,8 +65,8 @@ def get_feed(feed_url, last_update):
def get_entry(entry):
hashtags = []
for tag in entry.get('tags', []):
for t in tag['term'].split(' '):
hashtags.append('#{}'.format(t))
t = tag['term'].replace(' ', '_')
hashtags.append('#{}'.format(t))
return {
'url': entry.id,
'title': entry.title,