Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requests doesn't work in bet365 #2

Merged
merged 254 commits into from
Mar 30, 2024
Merged

Requests doesn't work in bet365 #2

merged 254 commits into from
Mar 30, 2024

Conversation

davilou
Copy link

@davilou davilou commented Mar 11, 2022

Hello, when I try to enter the bet365 website through the request, access is denied by cloudflare, error 1020, what can it be?

Summary by CodeRabbit

The provided bullet-point list is still valid and can be repeated verbatim:

  • Documentation

    • Updated the Code of Conduct to encourage respectful behavior and adherence to the Python Community Code of Conduct.
    • Refined issue templates for bugs, feature requests, and general questions to improve clarity and guidance for contributors.
    • Enhanced contributing guidelines with updated URLs, branch names, and code style recommendations.
    • Improved FAQs with information on decoding Brotli-encoded responses and updated Python version support.
    • Updated various documentation pages to reflect new features, changes, and community guidelines.
  • Chores

    • Configured Dependabot to perform weekly updates for GitHub Actions, ignoring patch releases.
    • Added workflow for automatically closing issues with specific labels.
    • Refined GitHub Actions workflows for linting, testing, and code analysis with updated versions and permissions.
    • Updated .gitignore to exclude additional files and directories.
    • Modified Makefile commands for better cross-environment compatibility.
  • New Features

    • Implemented a new search bar in the application interface for enhanced user experience.
    • Introduced a versioning strategy for package updates to ensure stability and security.
  • Bug Fixes

    • Addressed various issues with proxy configuration, error handling, and certificate verification in the codebase.
  • Refactor

    • Streamlined import statements and updated code to use modern Python conventions across multiple modules.
    • Adjusted exception handling and error messaging for clarity and consistency.
  • Style

    • Standardized string formatting to use double quotes and f-strings where applicable for code cleanliness.
  • Tests

    • Updated test configurations and added new dependencies to ensure comprehensive testing coverage.
  • Revert

    • Rolled back specific changes that were not aligned with project goals or caused unintended issues.

Please note that the above release notes have been summarized to provide an overview of changes that affect end-users and contributors. Detailed changes at the code level have been omitted for confidentiality.

Ian Stapleton Cordasco and others added 30 commits February 17, 2021 15:37
Provide directions for cloning repository despite malformed commits
% `python2 -c "import requests ; requests.get('https://github.com').json()"`
% `python3 -c "import requests ; requests.get('https://github.com').json()"`
quickstart.rst: r.json() can raise JSONDecodeError on Py3
The call to kwargs.setdefault was redundant and unnecessary as the lower-level session defaults to true.
Removed `import re` as unnecessary import
* disallow nan values in json serialize

* test nan value in json post

* added exception for invalid json in request

* use invalid json exception

* invalid json test
…s Python Community CoC (#5811)

* Updated references to new be-cordial-or-be-on-your-way URL.

* CoC now references Python Community Code of Conduct
All of these links now redirect to a repo under a different GitHub
user account.
httpbin does not limit Flask version and the 2.0 release has broken compatibility with our test suite
Although using the (non-vendored) chardet library is fine for requests
itself, but using a LGPL dependency the story is a lot less clear
for downstream projects, particularly ones that might like to bundle
requests (and thus chardet) in to a single binary -- think something
similar to what docker-compose is doing. By including an LGPL'd module
it is no longer clear if the resulting artefact must also be LGPL'd.

By changing out this dependency for one under MIT we remove all
license ambiguity.

As an "escape hatch" I have made the code so that it will use chardet
first if it is installed, but we no longer depend upon it directly,
although there is a new extra added, `requests[lgpl]`. This should
minimize the impact to users, and give them an escape hatch if
charset_normalizer turns out to be not as good. (In my non-exhaustive
tests it detects the same encoding as chartdet in every case I threw at
it)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
#5707)

Extract also creates the folder hierarchy, however we do not need that,
the file itself being extracted to a temporary folder is good enough.
Instead we read the content of the zip and then write it. The write is
not locked but it's OK to update the same file multiple times given the
update operation will not alter the content of the file. By not creating
the folder hierarchy (default via extract) we no longer can run into the
problem of two parallel extracts both trying to create the folder
hierarchy without exists ok flag, and one must fail.

Resolves #5223.

Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* Add support for Brotli decoding

When the brotli or brotlicffi packages are installed,
urllib3.util.make_headers() inserts ',br' in the Accept-Encoding header
and decodes br from the answers.

* Create the default Accept-Encoding header once

* Preserve the previous delimiter behavior

* Update prose in quickstart.rst

Co-authored-by: Seth Michael Larson <sethmichaellarson@gmail.com>
Co-authored-by: Mickaël Schoentgen <contact@tiger-222.fr>
Co-authored-by: Seth Michael Larson <sethmichaellarson@gmail.com>
pytest-httpbin<1.0 ships with a server certificate with a commonName but
no subjectAltName. urllib3 2.0 will stop supporting those in the future,
so we want to upgrade pytest-httpbin.

Unfortunately, `test_https_warnings` was relying on this broken
certificate. With this change, we use `trustme` to create a broken
certificate specifically for this test, so that we can upgrade
pytest-httpbin and make sure that other tests relying on httpbin TLS
support will continue to work with urllib3 2.0.
* Update advanced.rst

* remove confusing euphemism
Fix the listen() invocation for the test server not to pass a backlog
value of zero.  The value of zero means no backlog which effectively
means that the socket can not accept any connections.  This does not
matter for the majority of platforms since the value is only advisory
and the platform tends to go with a bigger backlog anyway.  However,
a few platforms (e.g. alpha or riscv Linux) do take the value literally,
and therefore the tests fail since they are unable to connect to
the server.
…invalid Transfer-Encoding: chunked response is returned. (#5906)
dependabot bot and others added 29 commits February 5, 2024 16:38
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.23.0 to 3.24.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@e5f05b8...e8893c5)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…deql-action-3.24.0

Bump github/codeql-action from 3.23.0 to 3.24.0
Cleanup defunct links from community docs page
Dropped support for pypy-3.7 and pypy-3.8 which are no longer maintained by upstream.
Added support for pypy-3.10.
…erializable

Fix #6628 - JSONDecodeError are not deserializable
A URL with excess leading / (path-separator)s would cause urllib3 to
attempt to reparse the request-uri as a full URI with a host and port.
This bypasses that logic in ConnectionPool.urlopen by replacing these
leading /s with just a single /.

Closes #6643
Trim excess leading path separators
Enhance `super_len` to count encoded bytes for str
Update account link for original author which has changed.
The rendered docs 'auto-link' this, which might encourage users to click
the link, even though it doesn't go anywhere.
ietf seems appropriate here - it's used elsewhere in the requets docs in
several places.
every chardet package maps to requests.packages.chardet.* package respectively
Previously, if someone made a request with `verify=False` then made a
request where they expected verification to be enabled to the same host,
they would potentially reuse a connection where TLS had not been
verified.

This fixes that issue.
Use TLS settings in selecting connection pool
This also adds certificates for testing purposes and files to make it
easy to generate/regenerate them.

This also replaces an existing test of how we utilize our pool manager
such that we don't connect to badssl.com

Finally, this adds additional context parameters for our pool manager to
account for mTLS certificates used by clients to authenticate to a
server.
Fix the proxy_bypass_registry function all returning true in some cases.
@kennethreitz kennethreitz merged commit 8dd3b26 into kennethreitz:master Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.