fix: solve the s.to captcha modal when a mirror answers the redirect - #32
Merged
Merged
Conversation
Contributor
|
Will be checked today |
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.
🏷️ Title Format
📝 Description
SerienstreamEpisode.provider_urldecides whether the provider redirect needs the captcha modal by comparing the response host with the redirect URL's host: a different host is taken as "the redirect left s.to".mirrors.request_with_failover) can answer from another s.to mirror than the one the redirect was built on:s.tocurrently doesn't resolve (NXDOMAIN), so every primary retry fails over toserienstream.to;serienstream.tothe failover moves to the bare-IP mirror186.2.175.5and stays there for_PRIMARY_RETRY_AFTER.solve_sto_modalis never called, and every episode fails within about a second withKeine VOE-Videoquelle auf der Seite gefunden.until the failover switches back.mirrors.site_for_url(resp.url) != "sto": only a response outside every s.to mirror counts as having reached the provider. Everything else goes throughsolve_sto_modalas intended.Impact seen on a 1.6.0 install: roughly 300 failed episodes per hour across several S.TO series for a full day. AniWorld, filmo and megakino were unaffected. With this change applied, the next episodes all downloaded and none failed.
🔗 Related Issue(s)
🔄 Type of Change
🧪 How Has This Been Tested?
New
tests/test_sto_provider_redirect.py: a redirect that reached the provider is taken as is; the bare-IP mirror, a deads.tofailing over toserienstream.to, and the same mirror all still get the modal solved. Without the fix, the two mirror cases fail.tests/test_providers.pyandtests/test_infra_mirrors.pystill pass.✅ Checklist
Diagnosed and written with the help of Claude Code; reviewed and tested on my own 1.6.0 install.