aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/main.py b/main.py
index 8f11942..f39df87 100644
--- a/main.py
+++ b/main.py
@@ -107,10 +107,13 @@ def main(mode=0):
if mode == 0:
holodex_organizations = HOLODEX_ORG.split(",")
print("Running Holodex API Data Collection\n"+"Found "+str(len(holodex_organizations))+" organizations")
- for org in holodex_organizations:
- hldex = HolodexAPI(fs.get_api_key("holodex_api_key"), member_count = ORG_MEMBER_COUNT, organization = org)
- data += hldex.get_data_all_channels()
- excluded_channels += hldex.get_exclude_channels()
+ try:
+ for org in holodex_organizations:
+ hldex = HolodexAPI(fs.get_api_key("holodex_api_key"), member_count = ORG_MEMBER_COUNT, organization = org)
+ data += hldex.get_data_all_channels()
+ excluded_channels += hldex.get_exclude_channels()
+ except:
+ main(mode=1)
elif mode == 1:
print("Running YouTube API Data Collection")
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage