Skip to content

Commit 241a4da

Browse files
committed
reddit scaling: don't fetch replies to posts that link to user's domain
for #1021
1 parent 8fa41f6 commit 241a4da

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

reddit.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def search_for_links(self):
7070
url_query = ' OR '.join([f'site:"{u}" OR selftext:"{u}"' for u in urls])
7171
return self.get_activities(
7272
search_query=url_query, group_id=gr_source.SEARCH, etag=self.last_activities_etag,
73-
fetch_replies=True, fetch_likes=False, fetch_shares=False, count=50)
73+
fetch_replies=False, fetch_likes=False, fetch_shares=False, count=50)
7474

7575
class AuthHandler(util.Handler):
7676
"""Base OAuth handler class."""

util.py

+3
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,9 @@ def get_webmention_target(url, resolve=True, replace_test_domains=True):
281281
logging.info('Dropping bad URL %s.', url)
282282
return url, None, False
283283

284+
if domain in ('puzzleadventura.com', 'sweetgamesbox.com'):
285+
return url, domain, False
286+
284287
send = True
285288
if resolve:
286289
# this follows *all* redirects, until the end

0 commit comments

Comments
 (0)