From 6df175a641274fe7c290cf8b89e10b820a980016 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 12 Dec 2019 18:14:55 +0000 Subject: [PATCH] Filename --- content.py | 3 ++- inbox.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/content.py b/content.py index dd051ad50..8d54edf38 100644 --- a/content.py +++ b/content.py @@ -97,7 +97,8 @@ def validHashTag(hashtag: str) -> bool: return True return False -def addHashTags(wordStr: str,httpPrefix: str,domain: str,replaceHashTags: {},postHashtags: {}) -> bool: +def addHashTags(wordStr: str,httpPrefix: str,domain: str, \ + replaceHashTags: {},postHashtags: {}) -> bool: """Detects hashtags and adds them to the replacements dict Also updates the hashtags list to be added to the post """ diff --git a/inbox.py b/inbox.py index 6d3eb1447..859413deb 100644 --- a/inbox.py +++ b/inbox.py @@ -84,8 +84,8 @@ def storeHashTags(baseDir: str,postJsonObject: {}) -> None: continue if not tag.get('name'): continue - tagName=tag['name'].replace('#','') - tagsFilename=tagsDir+'/'+tag['name']+'.txt' + tagName=tag['name'].replace('#','').replace("'",'') + tagsFilename=tagsDir+'/'+tagName+'.txt' postUrl=postJsonObject['id'].replace('/activity','').replace('/','#') if not os.path.isfile(tagsFilename): tagsFile=open(tagsFilename, "w+")