diff --git a/gallery_dl/extractor/twitter.py b/gallery_dl/extractor/twitter.py index 31b431b8..553dbaf4 100644 --- a/gallery_dl/extractor/twitter.py +++ b/gallery_dl/extractor/twitter.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2016-2025 Mike Fährmann +# Copyright 2016-2026 Mike Fährmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as @@ -1720,8 +1720,7 @@ class TwitterAPI(): def _client_transaction(self): self.log.info("Initializing client transaction keys") - from .. import transaction_id - ct = transaction_id.ClientTransaction() + ct = self.extractor.utils("transaction_id").ClientTransaction() ct.initialize(self.extractor) # update 'x-csrf-token' header (#7467) diff --git a/gallery_dl/transaction_id.py b/gallery_dl/extractor/utils/twitter_transaction_id.py similarity index 98% rename from gallery_dl/transaction_id.py rename to gallery_dl/extractor/utils/twitter_transaction_id.py index f8769d9a..aae3a5ca 100644 --- a/gallery_dl/transaction_id.py +++ b/gallery_dl/extractor/utils/twitter_transaction_id.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Mike Fährmann +# Copyright 2025-2026 Mike Fährmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as @@ -22,8 +22,8 @@ import random import hashlib import binascii import itertools -from . import text, util -from .cache import cache +from ... import text, util +from ...cache import cache class ClientTransaction():