From 1ad82c22d977cdd40dd27ca2afe8b4a5e7b37d26 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 5 Oct 2024 21:36:04 +0100 Subject: [PATCH] fix: headers --- application/parser/remote/github_loader.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/application/parser/remote/github_loader.py b/application/parser/remote/github_loader.py index f72d5278..8ffa5af1 100644 --- a/application/parser/remote/github_loader.py +++ b/application/parser/remote/github_loader.py @@ -31,8 +31,7 @@ class GitHubLoader(BaseRemote): def fetch_repo_files(self, repo_url: str, path: str = "") -> List[str]: url = f"https://api.github.com/repos/{repo_url}/contents/{path}" - response = requests.get(url, headers=self.headers) - response.raise_for_status() + response = requests.get(url, headers={**self.headers, "Accept": "application/vnd.github.v3.raw"}) contents = response.json() files = [] for item in contents: