filter instagram post captions for spam protection

This commit is contained in:
Suksi
2021-08-31 01:26:24 +03:00
parent 605b594863
commit bf34901093
+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():