mirror of
https://git.sr.ht/~cadence/NewLeaf
synced 2024-11-24 00:27:28 +00:00
#42 Return UNKNOWN error for not explicitly handled errors for channel extraction instead of stacktrace
This commit is contained in:
parent
c9b16d3efd
commit
29a3894337
@ -35,7 +35,10 @@ def extract_channel(ucid):
|
|||||||
"identifier": "ACCOUNT_TERMINATED"
|
"identifier": "ACCOUNT_TERMINATED"
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
print("Seen alert text '{}'".format(alert_text))
|
return {
|
||||||
|
"error": alert_text,
|
||||||
|
"identifier": "UNKNOWN"
|
||||||
|
}
|
||||||
|
|
||||||
header = yt_initial_data["header"]["c4TabbedHeaderRenderer"] if "c4TabbedHeaderRenderer" in yt_initial_data["header"] else {}
|
header = yt_initial_data["header"]["c4TabbedHeaderRenderer"] if "c4TabbedHeaderRenderer" in yt_initial_data["header"] else {}
|
||||||
channel_metadata = yt_initial_data["metadata"]["channelMetadataRenderer"]
|
channel_metadata = yt_initial_data["metadata"]["channelMetadataRenderer"]
|
||||||
|
Loading…
Reference in New Issue
Block a user