소스 검색

Improve rate limit detection

pull/8/head
tech234a 3 년 전
부모
커밋
aec980b78f
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. +2
    -2
      export.py
  2. +1
    -1
      tracker.py

+ 2
- 2
export.py 파일 보기

@@ -127,10 +127,10 @@ def subprrun(jobs, mysession, langcode, vid, mode):

page = mysession.get("https://www.youtube.com/timedtext_editor", params=pparams)

if not "accounts.google.com" in page.url:
if not "accounts.google.com" in page.url and page.status_code != 429:
break
else:
print("[Retrying in 30 seconds] Please supply authentication cookie information in config.json or environment variables. See README.md for more information.")
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.")
sleep(30)
except:
print("Error in request, retrying in 5 seconds...")


+ 1
- 1
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.01"
VERSION = "20200924.02"

TRACKER_ID = "ext-yt-communitycontribs"
TRACKER_HOST = "trackerproxy.meo.ws"


불러오는 중...
취소
저장