How to use the cloudscraper.reCaptcha.reCaptcha.dynamicImport function in cloudscraper

To help you get started, we’ve selected a few cloudscraper examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github VeNoMouS / cloudscraper / cloudscraper / __init__.py View on Github external
"Cloudflare reCaptcha detected, unfortunately we can't extract the parameters correctly."
            )

        hostParsed = urlparse(url)
        return {
            'url': '{}://{}{}'.format(
                hostParsed.scheme,
                hostParsed.netloc,
                payload.get('challengeUUID', '')
            ),
            'data': OrderedDict([
                ('r', payload.get('r', '')),
                ('id', payload.get('data_ray')),
                (
                    'g-recaptcha-response',
                    reCaptcha.dynamicImport(
                        provider.lower()
                    ).solveCaptcha(url, payload.get('site_key'), provider_params)
                )