Sorry for the interruption. We have been receiving a large volume of requests from your network.

-

To continue with your YouTube experience, please fill out the form below.

""" in wpage.text and not wpage.status_code == 429: +

To continue with your YouTube experience, please fill out the form below.

""" in wpage.text and not wpage.status_code == 429 and 'window["ytInitialPlayerResponse"] = ' in wpage.text and 'window["ytInitialData"] = ' in wpage.text: break else: print("Captcha detected, waiting 30 seconds") diff --git a/export.py b/export.py index 126872a..2d0ac35 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: + 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: 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.") diff --git a/tracker.py b/tracker.py index 5e07acb..5443deb 100644 --- a/tracker.py +++ b/tracker.py @@ -9,7 +9,7 @@ from os.path import isfile from json import loads # https://github.com/ArchiveTeam/tencent-weibo-grab/blob/9bae5f9747e014db9227821a9c11557267967023/pipeline.py -VERSION = "20200924.06" +VERSION = "20200924.07" TRACKER_ID = "ext-yt-communitycontribs" TRACKER_HOST = "trackerproxy.meo.ws"