Retry InnerTube POST on HTTP 429 so rotating proxies can switch IPs - #614
Open
DSeaStar wants to merge 1 commit into
Open
Retry InnerTube POST on HTTP 429 so rotating proxies can switch IPs#614DSeaStar wants to merge 1 commit into
DSeaStar wants to merge 1 commit into
Conversation
urllib3 Retry omits POST by default, so retries_when_blocked never fired on the listing request and raised IpBlocked on the first 429.
Coverage Report for CI Build 31810839759Coverage remained the same at 100.0%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
retries_when_blockedmounts an urllib3Retrywithstatus_forcelist=[429], but urllib3 only retries idempotent methods by default (HEAD/GET/PUT/DELETE/OPTIONS/TRACE).POST(_fetch_innertube_data). A 429 there was never retried, so rotating proxies never got a new IP andIpBlockedwas raised on the first hit.POSTinallowed_methodsso a 429 on that request retries as the proxy config already documents.Fixes #612
Test plan
test_retry_config_retries_post_on_429asserting the mounted Retry includesPOST,429, andretries_when_blockedtest_fetch__with_proxy_retry_when_blockedand related)ruff format/ruff check(0.6.8) on the touched files