From b97dc456b0e9854524b6d1cd408f4bb08d4078a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sun, 4 May 2025 07:42:44 +0200 Subject: [PATCH] [twitter] import 'transaction_id' only when needed --- gallery_dl/extractor/twitter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gallery_dl/extractor/twitter.py b/gallery_dl/extractor/twitter.py index a9a667b0..896bf288 100644 --- a/gallery_dl/extractor/twitter.py +++ b/gallery_dl/extractor/twitter.py @@ -9,7 +9,7 @@ """Extractors for https://x.com/""" from .common import Extractor, Message -from .. import text, util, exception, transaction_id +from .. import text, util, exception from ..cache import cache, memcache import itertools import random @@ -1508,6 +1508,8 @@ class TwitterAPI(): @cache(maxage=10800) def _client_transaction(self): self.log.info("Initializing client transaction keys") + + from .. import transaction_id ct = transaction_id.ClientTransaction() ct.initialize(self.extractor)