Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanExtreme002 committed Mar 23, 2024
1 parent 627674a commit f4d50dc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/FlightRadar24/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,18 +345,18 @@ def get_history_data(self, flight: Flight, file_type: str, timestamp: int) -> Di
raise LoginError("You must log in to your account.")

file_type = file_type.lower()

if file_type not in ["csv", "kml"]:
raise ValueError(f"File type '{file_type}' is not supported. Only CSV and KML are supported.")

response = APIRequest(
Core.historical_data_url.format(flight.id, file_type, timestamp),
Core.historical_data_url.format(flight.id, file_type, timestamp),
headers=Core.json_headers, cookies=self.__login_data["cookies"],
)

content = response.get_content()
return str(content.decode("utf-8"))

def get_login_data(self) -> Dict[Any, Any]:
"""
Return the user data.
Expand Down

0 comments on commit f4d50dc

Please sign in to comment.