You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dr0pstream.com put a standalone Cloudflare Turnstile widget in front of every embed path (#1481). The widget runs in reCAPTCHA compatibility mode (api.js?compat=recaptcha), the form posts op=embed, file_code and the token back to the embed URL, and the player page then carries the sources in a packed jwplayer setup.
This PR adds optional 2Captcha support and uses it in the DropLoad plugin - same idea as the ByParr setting, as a hosted service. Measurements and reasoning are in #1481.
Changes
lib/resolveurl/__init__.py: new optional setting twocaptcha_key (text, masked, default empty) in the ResolveURL category after the ByParr settings
lib/resolveurl/lib/captcha_lib.py: do_turnstile(sitekey, page_url) - createTask/getTaskResult against api.2captcha.com (TurnstileTaskProxyless, poll 5 s, timeout 120 s), notification "Solving Captcha, please wait" while it runs, returns the cf-turnstile-response / g-recaptcha-response fields or {} without a key
lib/resolveurl/plugins/dropload.py: detect the widget, fetch the token, POST the hidden fields + token to the embed URL (final host after the dropload.co/.pro redirect), scrape the sources via helpers.scrape_sources (unpacks the packed setup); without a key a clear ResolverError, without the gate the old path
Setup: Settings -> ResolveURL -> first tab "ResolveURL" -> "2Captcha API Key" (directly under "Enable ByParr access", or under "ByParr timeout" when ByParr is enabled; masked input). Key is global, entered once; the solving itself has to be wired per plugin - find the sitekey, captcha_lib.do_turnstile(sitekey, page_url), POST the hidden fields plus the returned dict. This PR wires DropLoad only.
Tested: sandbox with the real plugin on y5gc8a1dj600 (issue), 1srjaaed9it5, 22bw0d6w3uy3 (kinoger.to) - master.m3u8 -> child -> first .ts segment; Kodi on Android with DropLoad links from a German streaming site - plays, fast. Negative cases: no key -> ResolverError, wrong key -> 2Captcha: ERROR_KEY_DOES_NOT_EXIST, fake token -> gate again -> "Unable to locate stream URL".
Cost: 0.00145 USD per solve (single-use token, one solve per resolve), a 10 USD top-up is roughly 6,900 resolves.
Limits: only the en_gb labels are added, the other language files still need 33107/33108; the poll blocks for the solve time; addon.xml/changelog untouched.
Will think this over. I am thinking of removing byparr support and and add cf-clearance-scraper support. cf-clearance-scraper can do whatever byparr does and in addition solve turnstile without 2captcha subscription
Makes sense, your call either way. One thing on the 2Captcha side:
It is not a subscription. 2Captcha's own pricing page states they offer no
subscriptions, plans or bulk packages - you top up a balance from $1 and
pay per solved captcha, same rate at any volume. Cloudflare Turnstile is
listed at $1.45 per 1000, which matches what I measured on my own account
(0.00145 USD per resolve, single-use token, one solve per resolve). The
setting defaults to empty, so it costs nothing for anyone who never fills
it in.
The difference between the two is not which one solves Turnstile, it is
what the user has to run. cf-clearance-scraper and ByParr both need a
container with a real browser on the local network. That is fine for
anyone with a NAS or a PC running 24/7, but a large part of the Kodi user
base is on Android TV boxes, Fire sticks, a Shield or a Pi, where that is
not an option. A key in a text field works on every platform Kodi runs on.
So I don't think the two compete. do_turnstile only fires when a key is set,
so a local solver can take priority and the key stays as the fallback for
people who cannot host anything.
For the record, I have not tested cf-clearance-scraper against dr0pstream
myself.
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
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.
description
dr0pstream.com put a standalone Cloudflare Turnstile widget in front of every embed path (#1481). The widget runs in reCAPTCHA compatibility mode (
api.js?compat=recaptcha), the form postsop=embed,file_codeand the token back to the embed URL, and the player page then carries the sources in a packed jwplayer setup.This PR adds optional 2Captcha support and uses it in the DropLoad plugin - same idea as the ByParr setting, as a hosted service. Measurements and reasoning are in #1481.
Changes
lib/resolveurl/__init__.py: new optional settingtwocaptcha_key(text, masked, default empty) in the ResolveURL category after the ByParr settingslib/resolveurl/lib/captcha_lib.py:do_turnstile(sitekey, page_url)- createTask/getTaskResult against api.2captcha.com (TurnstileTaskProxyless, poll 5 s, timeout 120 s), notification "Solving Captcha, please wait" while it runs, returns thecf-turnstile-response/g-recaptcha-responsefields or{}without a keylib/resolveurl/lib/strings.py,resources/language/resource.language.en_gb/strings.po: ids 33107 "2Captcha API Key", 33108 "Solving Captcha, please wait"lib/resolveurl/plugins/dropload.py: detect the widget, fetch the token, POST the hidden fields + token to the embed URL (final host after the dropload.co/.pro redirect), scrape the sources viahelpers.scrape_sources(unpacks the packed setup); without a key a clear ResolverError, without the gate the old pathSetup: Settings -> ResolveURL -> first tab "ResolveURL" -> "2Captcha API Key" (directly under "Enable ByParr access", or under "ByParr timeout" when ByParr is enabled; masked input). Key is global, entered once; the solving itself has to be wired per plugin - find the sitekey,
captcha_lib.do_turnstile(sitekey, page_url), POST the hidden fields plus the returned dict. This PR wires DropLoad only.Tested: sandbox with the real plugin on
y5gc8a1dj600(issue),1srjaaed9it5,22bw0d6w3uy3(kinoger.to) - master.m3u8 -> child -> first .ts segment; Kodi on Android with DropLoad links from a German streaming site - plays, fast. Negative cases: no key -> ResolverError, wrong key ->2Captcha: ERROR_KEY_DOES_NOT_EXIST, fake token -> gate again -> "Unable to locate stream URL".Cost: 0.00145 USD per solve (single-use token, one solve per resolve), a 10 USD top-up is roughly 6,900 resolves.
Limits: only the en_gb labels are added, the other language files still need 33107/33108; the poll blocks for the solve time; addon.xml/changelog untouched.