From ee9bbf49f28bcb517fb2f58454fa8da9346949d7 Mon Sep 17 00:00:00 2001 From: Chung1912 <38153111+chung1912@users.noreply.github.com> Date: Sun, 11 May 2025 23:27:27 +0800 Subject: [PATCH] feat: Add Atom subscription source --- app/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 8747290..11e440a 100644 --- a/app/main.py +++ b/app/main.py @@ -48,6 +48,7 @@ exp2 = re.compile(r'^(?:https?://)?github\.com/(?P.+?)/(?P.+?)/(?: exp3 = re.compile(r'^(?:https?://)?github\.com/(?P.+?)/(?P.+?)/(?:info|git-).*$') exp4 = re.compile(r'^(?:https?://)?raw\.(?:githubusercontent|github)\.com/(?P.+?)/(?P.+?)/.+?/.+$') exp5 = re.compile(r'^(?:https?://)?gist\.(?:githubusercontent|github)\.com/(?P.+?)/.+?/.+$') +exp6 = re.compile(r'^(?:https?://)?github\.com/(?P[^/]+)/(?P[^/]+)/(?P[^/.]+)\.atom(?:\?.*)?$') requests.sessions.default_headers = lambda: CaseInsensitiveDict() @@ -107,7 +108,7 @@ def iter_content(self, chunk_size=1, decode_unicode=False): def check_url(u): - for exp in (exp1, exp2, exp3, exp4, exp5): + for exp in (exp1, exp2, exp3, exp4, exp5, exp6): m = exp.match(u) if m: return m