Skip to content

Commit

Permalink
fix: fromisoformat in bluesky prior to python 3.11 (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
Misaka13514 authored Feb 16, 2024
1 parent dd1bd3e commit 57126f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nazurin/sites/bluesky/api.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import os
from datetime import datetime
from typing import List, Tuple

from nazurin.models import Caption, Illust, Image
from nazurin.utils import Request
from nazurin.utils.decorators import network_retry
from nazurin.utils.exceptions import NazurinError
from nazurin.utils.helpers import fromisoformat

from .config import DESTINATION, FILENAME

Expand Down Expand Up @@ -88,7 +88,7 @@ def get_storage_dest(item: dict, pic: dict, index: int = 0) -> Tuple[str, str]:
"""

url = pic["fullsize"]
created_at = datetime.fromisoformat(item["record"]["createdAt"])
created_at = fromisoformat(item["record"]["createdAt"])
basename = os.path.basename(url)
filename, extension = basename.split("@")
context = {
Expand Down

0 comments on commit 57126f9

Please sign in to comment.