Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fromisoformat in bluesky prior to python 3.11 #95

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading