Updated
This commit is contained in:
@@ -1647,9 +1647,6 @@ def get_recent_bsky_posts(client, handle, limit=30):
|
||||
urls.extend(extract_non_x_urls_from_text(text))
|
||||
urls.extend(extract_urls_from_facets(record))
|
||||
|
||||
canonical_non_x_urls = set()
|
||||
for url in urls:
|
||||
if not is_tco_domain(url) and not is_x_or_twitter_domain(url):
|
||||
canonical = canonicalize_url(normalize_urlish_token(url) or url)
|
||||
if canonical:
|
||||
canonical_non_x_urls.add(canonical)
|
||||
@@ -1702,7 +1699,6 @@ def get_rate_limit_wait_seconds(error_obj, default_delay):
|
||||
if x_after:
|
||||
return min(max(int(x_after), 1), BSKY_LOGIN_MAX_DELAY)
|
||||
|
||||
|
||||
reset_value = headers.get("ratelimit-reset") or headers.get("RateLimit-Reset")
|
||||
if reset_value:
|
||||
wait_seconds = max(int(reset_value) - now_ts + 1, default_delay)
|
||||
@@ -3343,6 +3339,8 @@ def sync_feeds(args):
|
||||
|
||||
except Exception as e:
|
||||
logging.error(f"❌ Error during sync cycle: {e}")
|
||||
|
||||
|
||||
def main():
|
||||
load_dotenv()
|
||||
|
||||
@@ -3421,5 +3419,7 @@ load_dotenv()
|
||||
reset_caches()
|
||||
sync_feeds(args)
|
||||
logging.info("🤖 Bot finished.")
|
||||
if name == "main":
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user