From 64de5453273f7541242816ae3270d899d7adb197 Mon Sep 17 00:00:00 2001 From: Eva Date: Fri, 25 Sep 2020 21:28:33 +0200 Subject: [PATCH] More robust rate limit check --- export.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/export.py b/export.py index 2d0ac35..e691413 100644 --- a/export.py +++ b/export.py @@ -139,7 +139,7 @@ def subprrun(mysession, langcode, vid, mode, needforcemetadata, needforcecaption page = mysession.get("https://www.youtube.com/timedtext_editor", params=pparams) - if not "accounts.google.com" in page.url and page.status_code != 429 and 'Subtitles/CC' in page.text and 'Title & description' in page.text: + if not "accounts.google.com" in page.url and page.status_code != 429 and 'Subtitles/CC' in page.text and ('Title & description' in page.text or 'Title and description' in page.text): break else: print("[Retrying in 30 seconds for rate limit or login failure] Please supply authentication cookie information in config.json or environment variables. See README.md for more information.")