filter instagram post captions for spam protection

This commit is contained in:
Suksi
2021-08-31 00:24:17 +03:00
parent cd2d6fbb8d
commit 8741a46de8
+2
View File
@@ -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():