#42 Return UNKNOWN error for not explicitly handled errors for channel extraction instead of stacktrace

This commit is contained in:
Lomanic 2021-11-13 19:55:08 +01:00 committed by Cadence Ember
parent c9b16d3efd
commit 29a3894337
1 changed files with 4 additions and 1 deletions

View File

@ -35,7 +35,10 @@ def extract_channel(ucid):
"identifier": "ACCOUNT_TERMINATED"
}
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 {}
channel_metadata = yt_initial_data["metadata"]["channelMetadataRenderer"]