Skip to content

Commit

Permalink
Fix for missing entry in seen hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
nanos committed Jul 2, 2024
1 parent c5af476 commit 2e99ce0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion find_posts.py
Original file line number Diff line number Diff line change
Expand Up @@ -1604,7 +1604,9 @@ def fetch_timeline_context(timeline_posts, token, parsed_urls, seen_hosts, seen_

for host in list(seen_hosts):
serverInfo = seen_hosts.get(host)
if 'last_checked' in serverInfo:
if 'peertubeApiSupport' not in serverInfo:
seen_hosts.pop(host)
elif 'last_checked' in serverInfo:
serverAge = datetime.now(serverInfo['last_checked'].tzinfo) - serverInfo['last_checked']
if(serverAge.total_seconds() > arguments.remember_hosts_for_days * 24 * 60 * 60 ):
seen_hosts.pop(host)
Expand Down

0 comments on commit 2e99ce0

Please sign in to comment.