Skip to content

Commit 57126f9

Browse files
authored
fix: fromisoformat in bluesky prior to python 3.11 (#95)
1 parent dd1bd3e commit 57126f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nazurin/sites/bluesky/api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import os
2-
from datetime import datetime
32
from typing import List, Tuple
43

54
from nazurin.models import Caption, Illust, Image
65
from nazurin.utils import Request
76
from nazurin.utils.decorators import network_retry
87
from nazurin.utils.exceptions import NazurinError
8+
from nazurin.utils.helpers import fromisoformat
99

1010
from .config import DESTINATION, FILENAME
1111

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

9090
url = pic["fullsize"]
91-
created_at = datetime.fromisoformat(item["record"]["createdAt"])
91+
created_at = fromisoformat(item["record"]["createdAt"])
9292
basename = os.path.basename(url)
9393
filename, extension = basename.split("@")
9494
context = {

0 commit comments

Comments
 (0)