Fix bug blocking other methods from running

This commit is contained in:
Dylan 2024-05-17 21:55:01 +01:00
parent 58ba2e9417
commit fb50219788

View File

@ -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