diff --git a/files/helpers/offsitementions.py b/files/helpers/offsitementions.py index b99d5f19f8..d02fbe0c66 100644 --- a/files/helpers/offsitementions.py +++ b/files/helpers/offsitementions.py @@ -44,10 +44,16 @@ def get_mentions(queries): if i['subreddit'] == 'PokemonGoRaids': continue if kind == 'comment': - text = f'
' + body = i["body"].replace('>', '> ') + text = f'{i["body"]}
' else: - text = f'{body}
' - if i["selftext"]: text += f'{i["title"]}
' + title = i["title"].replace('>', '> ') + text = f'{i["selftext"][:5000]}
' + + if i["selftext"]: + selftext = i["selftext"].replace('>', '> ')[:5000] + text += f'{title}
' + mentions.append({ 'permalink': i['permalink'],{selftext}