mirror of https://gitlab.com/bashrc2/epicyon
Filename
parent
851ac0fc18
commit
6df175a641
|
@ -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
|
||||
"""
|
||||
|
|
4
inbox.py
4
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+")
|
||||
|
|
Loading…
Reference in New Issue