forked from rDrama/rDrama
parent
2362afa622
commit
5e773f9e75
|
@ -148,8 +148,8 @@ if SITE_NAME == 'rDrama':
|
||||||
|
|
||||||
PROFANITIES = {
|
PROFANITIES = {
|
||||||
'motherfucker': 'motherlover',
|
'motherfucker': 'motherlover',
|
||||||
'fuck': 'frick',
|
'fuck': ['frick', 'fudge', 'freak'],
|
||||||
' ass ': ' butt ',
|
' ass ': [' butt ', ' backside ', ' bum '],
|
||||||
'shitting': 'pooping',
|
'shitting': 'pooping',
|
||||||
'lmao': 'lmbo',
|
'lmao': 'lmbo',
|
||||||
'damn': 'darn',
|
'damn': 'darn',
|
||||||
|
@ -1680,4 +1680,4 @@ if SITE_NAME == 'rDrama':
|
||||||
|
|
||||||
IMAGE_FORMATS = ['png','gif','jpg','jpeg','webp']
|
IMAGE_FORMATS = ['png','gif','jpg','jpeg','webp']
|
||||||
VIDEO_FORMATS = ['mp4','webm','mov','avi','mkv','flv','m4v','3gp']
|
VIDEO_FORMATS = ['mp4','webm','mov','avi','mkv','flv','m4v','3gp']
|
||||||
AUDIO_FORMATS = ['mp3','wav','ogg','aac','m4a','flac']
|
AUDIO_FORMATS = ['mp3','wav','ogg','aac','m4a','flac']
|
|
@ -126,6 +126,8 @@ def sub_matcher(match:re.Match, upper=False, replace_with:Union[dict[str, str],
|
||||||
return match_str
|
return match_str
|
||||||
else:
|
else:
|
||||||
repl = replace_with[match_str.lower()]
|
repl = replace_with[match_str.lower()]
|
||||||
|
if not isinstance(repl, str):
|
||||||
|
repl = random.choice(repl)
|
||||||
return repl if not upper or "<img" in repl else repl.upper()
|
return repl if not upper or "<img" in repl else repl.upper()
|
||||||
|
|
||||||
def sub_matcher_upper(match, replace_with:Union[dict[str, str], dict[str, List[str]]]=SLURS):
|
def sub_matcher_upper(match, replace_with:Union[dict[str, str], dict[str, List[str]]]=SLURS):
|
||||||
|
|
Loading…
Reference in New Issue