Ver código fonte

Improve rate limit detection

pull/8/head
tech234a 3 anos atrás
pai
commit
aec980b78f
2 arquivos alterados com 3 adições e 3 exclusões
  1. +2
    -2
      export.py
  2. +1
    -1
      tracker.py

+ 2
- 2
export.py Ver arquivo

@@ -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 Ver arquivo

@@ -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"


Carregando…
Cancelar
Salvar