solve method
Solves a single JavaScript challenge of the specified type.
Returns the solved challenge as a string.
See solveBulk for bulk solving.
Implementation
@override
Future<String> solve(
String playerUrl, JSChallengeType type, String challenge) async {
final key = (playerUrl, challenge, type);
if (_sigCache.containsKey(key)) {
return _sigCache[key]!;
}
final results = await solveBulk(playerUrl, {
type: [challenge]
});
final decoded = results[challenge];
if (decoded == null) {
throw Exception('No data for challenge: $challenge');
}
return decoded;
}