mirror of https://github.com/hunshcn/gh-proxy
feat: Add Atom subscription source
parent
9b24915abe
commit
ee9bbf49f2
|
@ -48,6 +48,7 @@ exp2 = re.compile(r'^(?:https?://)?github\.com/(?P<author>.+?)/(?P<repo>.+?)/(?:
|
|||
exp3 = re.compile(r'^(?:https?://)?github\.com/(?P<author>.+?)/(?P<repo>.+?)/(?:info|git-).*$')
|
||||
exp4 = re.compile(r'^(?:https?://)?raw\.(?:githubusercontent|github)\.com/(?P<author>.+?)/(?P<repo>.+?)/.+?/.+$')
|
||||
exp5 = re.compile(r'^(?:https?://)?gist\.(?:githubusercontent|github)\.com/(?P<author>.+?)/.+?/.+$')
|
||||
exp6 = re.compile(r'^(?:https?://)?github\.com/(?P<author>[^/]+)/(?P<repo>[^/]+)/(?P<type>[^/.]+)\.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
|
||||
|
|
Loading…
Reference in New Issue