Skip to content

Commit

Permalink
Merge pull request Kometa-Team#2077 from Kometa-Team/yaml-fix
Browse files Browse the repository at this point in the history
Fix URL YAML calls
  • Loading branch information
meisnate12 authored May 29, 2024
2 parents 67fc3ca + 1842660 commit bd7bffb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.1-develop26
2.0.1-develop27
4 changes: 2 additions & 2 deletions modules/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def download_image(self, title, image_url, download_directory, is_poster=True, f
def file_yaml(self, path_to_file, check_empty=False, create=False, start_empty=False):
return YAML(path=path_to_file, check_empty=check_empty, create=create, start_empty=start_empty)

def get_yaml(self, url, check_empty=False):
response = self.get(url)
def get_yaml(self, url, headers=None, check_empty=False):
response = self.get(url, headers=headers)
if response.status_code >= 400:
raise Failed(f"URL Error: No file found at {url}")
return YAML(input_data=response.content, check_empty=check_empty)
Expand Down

0 comments on commit bd7bffb

Please sign in to comment.