调整正则,使用最短匹配

This commit is contained in:
jimorsm 2024-02-02 03:56:24 +08:00
parent dfdc537c83
commit 46c8aa3767

View File

@ -206,7 +206,7 @@ def main():
headers = {"Accept": "application/vnd.github+json"}
releases = []
url_str = f"{args.base_url}{repo}/releases"
pattern = re.compile(r'<(.*)>;\s*rel="next"')
pattern = re.compile(r'.*<(.*?)>;\s*rel="next"')
while url_str:
r = github_get(url_str, headers=headers)
r.raise_for_status()