From c2b2694b3edbd0f849ecdc4e6725c1ebb233a50b Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 13 Aug 2023 15:30:14 +0100 Subject: [PATCH] More logging to track down issue --- twExtract/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/twExtract/__init__.py b/twExtract/__init__.py index 732c235..044df04 100644 --- a/twExtract/__init__.py +++ b/twExtract/__init__.py @@ -147,7 +147,10 @@ def extractStatusV2(url): def extractStatusV2Legacy(url): tweet = extractStatusV2(url) if 'errors' in tweet or 'legacy' not in tweet: - raise twExtractError.TwExtractError(400, "Extract error") + if 'errors' in tweet: + raise twExtractError.TwExtractError(400, "Extract error: "+json.dumps(tweet['errors'])) + else: + raise twExtractError.TwExtractError(400, "Extract error (no legacy data)") tweet['legacy']['user'] = tweet["core"]["user_result"]["result"]["legacy"] tweet['legacy']['user']['profile_image_url'] = tweet['legacy']['user']['profile_image_url_https'] if 'card' in tweet: