From fb502197882b80706e3db7e9e21b34ba5742c565 Mon Sep 17 00:00:00 2001 From: Dylan Date: Fri, 17 May 2024 21:55:01 +0100 Subject: [PATCH] Fix bug blocking other methods from running --- twExtract/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/twExtract/__init__.py b/twExtract/__init__.py index af5f45a..42f3300 100644 --- a/twExtract/__init__.py +++ b/twExtract/__init__.py @@ -389,7 +389,11 @@ def extractStatus(url,workaroundTokens=None): methods=[extractStatus_syndication,extractStatusV2AnonLegacy,extractStatusV2AndroidLegacy,extractStatusV2Legacy] for method in methods: try: - return method(url,workaroundTokens) + result = method(url,workaroundTokens) + if 'errors' in result: + # try another method + continue + return result except Exception as e: print(f"{method.__name__} method failed: {str(e)} for {url}") continue