Skip to content

Commit

Permalink
Merge pull request #200 from Kometa-Team/date-format-change
Browse files Browse the repository at this point in the history
Handle new date format from TMDB
  • Loading branch information
YozoraXCII authored Dec 7, 2024
2 parents ab199f8 + a466e26 commit 7c4f2df
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tmdbapis/tmdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ def _parse(self, data=None, attrs: Optional[Union[str, list]] = None, value_type
elif value_type == "date":
if not value:
return None
elif " UT" in value:
return datetime.strptime(value[:-1].split(".")[0], "%Y-%m-%d %H:%M:%S UT")
elif "T" in value:
return datetime.strptime(value[:-1].split(".")[0], "%Y-%m-%dT%H:%M:%S")
else:
Expand Down

0 comments on commit 7c4f2df

Please sign in to comment.