From c4063f081c2750ac137794eab6cba0b45b36082d Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 30 Oct 2022 00:53:42 +0200 Subject: [PATCH] moved boosted sites to const.py --- files/helpers/const.py | 47 ++++++++++++++++++++++++++++++++++++++++ files/routes/votes.py | 49 +----------------------------------------- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index ae9e6fbbe..3e965a740 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -1339,3 +1339,50 @@ forced_hats = { } EMAIL_REGEX_PATTERN = '[A-Za-z0-9._%+-]{1,64}@[A-Za-z0-9.-]{2,63}\.[A-Za-z]{2,63}' + +BOOSTED_SITES = { + 'rdrama.net', + 'pcmemes.net', + 'watchpeopledie.tv', + 'quora.com', + 'cumtown.org', + 'notabug.io', + 'talk.lol', + 'discussions.app', + 'gab.com', + 'kiwifarms.net', + 'gettr.com', + 'scored.co', + 'parler.com', + 'bitchute.com', + '4chan.org', + 'givesendgo.com', + 'thepinkpill.com', + 'ovarit.com', + 'rdrama.cc', + 'lolcow.farm', + 'truthsocial.com', + 'rumble.com', + 'saidit.net', + 'kiwifarms.cc', + '8kun.top', + 'goyimtv.tv', + 'poal.co', + 'stormfront.org', + 'arete.network', + 'poa.st', + 'lbry.com', + 'crystal.cafe', + 'tribel.com', + 'mstdn.social', + 'mastodon.online', + 'steemit.com', + 'hexbear.net', + 'raddle.me', + 'lemmy.ml', + 'bluelight.org', + 'incels.is', + 'groups.google.com', + 't.me', + 'web.telegram.org' +} diff --git a/files/routes/votes.py b/files/routes/votes.py index bb548d3d8..1a5335599 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -139,54 +139,7 @@ def vote_post_comment(target_id, new, v, cls, vote_cls): target.downvotes = get_vote_count(-1, False) target.realupvotes = get_vote_count(0, True) # first arg is ignored here - boost_sites = { - 'rdrama.net', - 'pcmemes.net', - 'watchpeopledie.tv', - 'quora.com', - 'cumtown.org', - 'notabug.io', - 'talk.lol', - 'discussions.app', - 'gab.com', - 'kiwifarms.net', - 'gettr.com', - 'scored.co', - 'parler.com', - 'bitchute.com', - '4chan.org', - 'givesendgo.com', - 'thepinkpill.com', - 'ovarit.com', - 'rdrama.cc', - 'lolcow.farm', - 'truthsocial.com', - 'rumble.com', - 'saidit.net', - 'kiwifarms.cc', - '8kun.top', - 'goyimtv.tv', - 'poal.co', - 'stormfront.org', - 'arete.network', - 'poa.st', - 'lbry.com', - 'crystal.cafe', - 'tribel.com', - 'mstdn.social', - 'mastodon.online', - 'steemit.com', - 'hexbear.net', - 'raddle.me', - 'lemmy.ml', - 'bluelight.org', - 'incels.is', - 'groups.google.com', - 't.me', - 'web.telegram.org' - } - - if target.author.progressivestack or (cls == Submission and (target.sub in ('space', 'istory', 'dinos') or target.domain.endswith('.win') or target.domain in boost_sites)): + if target.author.progressivestack or (cls == Submission and (target.sub in ('space', 'istory', 'dinos') or target.domain.endswith('.win') or target.domain in BOOSTED_SITES)): target.realupvotes *= 2 g.db.add(target) return "", 204