1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2025-06-23 03:46:19 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Jille Timmermans
db452a035a
Merge 890f5a41b99d9227f260ab9891126c8ad7633c2a into 3eb8d22ddb8982ca4fb56bb7a8d6517538bf14c6 2025-04-01 08:38:47 +02:00
Jille Timmermans
890f5a41b9 [hls downloader] Sleep 10 seconds after getting a 429 Too Many Requests
Otherwise the next retry will happen immediately, most likely also
getting a 429.
2022-08-14 11:36:56 +02:00

View File

@ -2,6 +2,7 @@ from __future__ import unicode_literals
import re
import binascii
import time
try:
from Crypto.Cipher import AES
can_decrypt_frag = True
@ -159,6 +160,8 @@ class HlsFD(FragmentFD):
count += 1
if count <= fragment_retries:
self.report_retry_fragment(err, frag_index, count, fragment_retries)
if err.code == 429:
time.sleep(10.0)
if count > fragment_retries:
if skip_unavailable_fragments:
i += 1