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

not working #73

Open
Mvrk0o opened this issue Feb 9, 2025 · 2 comments
Open

not working #73

Mvrk0o opened this issue Feb 9, 2025 · 2 comments

Comments

@Mvrk0o
Copy link

Mvrk0o commented Feb 9, 2025

Image

why did it stop working??

@VCoves
Copy link

VCoves commented Feb 12, 2025

I have a fix, it is basically this comment in this issue.
Issue: #59
comment: #59 (comment)
Proof this works for your case:

import requests


def main():
    base = 'codeforces.com/problemset'
    base = 'codeforces.com/contest/2065/standings/friends/true/page/1'
    http_url = f'http://{base}'
    https_url = f'https://{base}'
    for url in [http_url, https_url]:
        for imper in ['chrome', None]:
            response = cf_req.get(url,impersonate=imper)
            msg = "OK" if response.status_code == 200 else "FAIL"
            print(f"[CURL_CFFI] {{{msg}}} {response.status_code} url={url} impersonate={imper}  {len(response.text)}")

    for url in [http_url, https_url]:
        response = requests.get(url)
        msg = "OK" if response.status_code == 200 else "FAIL"
        print(f"[requests] {response.status_code} url={url}  {len(response.text)}")

main()
Image

@meooow25
Copy link
Owner

meooow25 commented Feb 16, 2025

why did it stop working??

Thanks for the report and the screenshot.
You can see that Codeforces responding with a 404 on an API call. This is probably the user.ratedList endpoint which has been returning 404 for a few days now, I believe. This endpoint is necessary for the extension to make rating predictions, if it's down it will stop working.

So why did Codeforces turn it down? Who knows 🤷
Codeforces frequently takes the API down or blocks it with Cloudflare, without announcing it or communicating why.

There is a possible alternate way, which is #46. I haven't had much free time recently, but I will try to get that working soon.

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

No branches or pull requests

3 participants