mirror of
https://github.com/sossuOrkesteri/sossunVerkkosivut.git
synced 2026-10-12 19:23:37 +03:00
filter instagram post captions for spam protection
This commit is contained in:
@@ -41,6 +41,8 @@ def format_media(media):
|
||||
|
||||
# remove hashtags from the ends of captions
|
||||
entry["caption"] = re.sub("(\s?#\S+)*$", "", entry["caption"])
|
||||
# replace @ signs in email addesses to avoid spam
|
||||
entry["caption"] = re.sub("@gmail.com", "\[at\]gmail.com", entry["caption"])
|
||||
return media
|
||||
|
||||
def fetch_instagram_media():
|
||||
|
||||
Reference in New Issue
Block a user