mirror of
https://github.com/developersIndia/deviras.git
synced 2024-09-08 05:05:35 +05:30
escape |
This commit is contained in:
parent
5d7700d61b
commit
9cce47796f
@ -26,6 +26,7 @@ def get_posts_by_flair(subreddit, flair):
|
||||
for post in subreddit.search(f'flair_name:"{flair}"', time_filter='month'):
|
||||
post_date = datetime.datetime.fromtimestamp(post.created_utc)
|
||||
if post_date.year == current_year and post_date.month == current_month:
|
||||
post.title = post.title.replace("|", "\\|") # Escape the "|" character
|
||||
posts.append(post)
|
||||
|
||||
posts = sorted(posts, key=lambda post: post.created_utc, reverse=True)
|
||||
|
Loading…
Reference in New Issue
Block a user