forked from rDrama/rDrama
fix accidential greentext in reddit mentions
parent
a8c4c7bcc5
commit
e121523a42
|
@ -44,10 +44,16 @@ def get_mentions(queries):
|
||||||
if i['subreddit'] == 'PokemonGoRaids': continue
|
if i['subreddit'] == 'PokemonGoRaids': continue
|
||||||
|
|
||||||
if kind == 'comment':
|
if kind == 'comment':
|
||||||
text = f'<blockquote><p>{i["body"]}</p></blockquote>'
|
body = i["body"].replace('>', '> ')
|
||||||
|
text = f'<blockquote><p>{body}</p></blockquote>'
|
||||||
else:
|
else:
|
||||||
text = f'<blockquote><p>{i["title"]}</p></blockquote>'
|
title = i["title"].replace('>', '> ')
|
||||||
if i["selftext"]: text += f'<br><blockquote><p>{i["selftext"][:5000]}</p></blockquote>'
|
text = f'<blockquote><p>{title}</p></blockquote>'
|
||||||
|
|
||||||
|
if i["selftext"]:
|
||||||
|
selftext = i["selftext"].replace('>', '> ')[:5000]
|
||||||
|
text += f'<br><blockquote><p>{selftext}</p></blockquote>'
|
||||||
|
|
||||||
|
|
||||||
mentions.append({
|
mentions.append({
|
||||||
'permalink': i['permalink'],
|
'permalink': i['permalink'],
|
||||||
|
|
Loading…
Reference in New Issue