From 344f6c55f3f19d01462336f9f83b4218df533f0b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 21 Sep 2021 23:01:52 +0100 Subject: [PATCH] Replacing twitter --- media.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/media.py b/media.py index 3f43fdb9a..c78d7cee4 100644 --- a/media.py +++ b/media.py @@ -42,7 +42,7 @@ def _replaceSiloDomain(postJsonObject: {}, contentStr = getBaseContentFromPost(postJsonObject, systemLanguage) if siloDomain not in contentStr: return - contentStr = contentStr.replace('www.youtube.com', replacementDomain) + contentStr = contentStr.replace(siloDomain, replacementDomain) postJsonObject['object']['content'] = contentStr if postJsonObject['object'].get('contentMap'): postJsonObject['object']['contentMap'][systemLanguage] = contentStr @@ -53,8 +53,8 @@ def replaceYouTube(postJsonObject: {}, replacementDomain: str, """Replace YouTube with a replacement domain This denies Google some, but not all, tracking data """ - return _replaceSiloDomain(postJsonObject, 'www.youtube.com', - replacementDomain, systemLanguage) + _replaceSiloDomain(postJsonObject, 'www.youtube.com', + replacementDomain, systemLanguage) def replaceTwitter(postJsonObject: {}, replacementDomain: str, @@ -62,8 +62,8 @@ def replaceTwitter(postJsonObject: {}, replacementDomain: str, """Replace Twitter with a replacement domain This allows you to view twitter posts without having a twitter account """ - return _replaceSiloDomain(postJsonObject, 'twitter.com', - replacementDomain, systemLanguage) + _replaceSiloDomain(postJsonObject, 'twitter.com', + replacementDomain, systemLanguage) def _removeMetaData(imageFilename: str, outputFilename: str) -> None: