From 43faa6139acfaf2a18b3ebee76fb483990d66126 Mon Sep 17 00:00:00 2001 From: Samuel Sloniker Date: Thu, 24 Nov 2022 20:57:14 -0800 Subject: [PATCH] Format download.py --- download.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/download.py b/download.py index 1f68e52..aa5bd23 100644 --- a/download.py +++ b/download.py @@ -7,7 +7,9 @@ import bs4 def matches(string, checks): for check in checks: - if check["type"] == "startswith" and string.startswith(check["pattern"]): + if check["type"] == "startswith" and string.startswith( + check["pattern"] + ): return True return False @@ -44,7 +46,8 @@ try: entries = [ entry for entry in feedparser.parse(url)["entries"] - if not entry["link"] in known and not matches(entry["link"], config.get("exclude", [])) + if not entry["link"] in known + and not matches(entry["link"], config.get("exclude", [])) ] print(f"Fetched feed. Found {len(entries)} new articles.")