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

Switching to new ankiweb API #7

Merged
merged 14 commits into from
Aug 1, 2023
Merged

Switching to new ankiweb API #7

merged 14 commits into from
Aug 1, 2023

Conversation

szobov
Copy link
Owner

@szobov szobov commented Aug 1, 2023

Recently, ankiweb changed its API, and this change was drastic.
They moved from HTML forms and bare http-requests to Protobuf communication and sent binary Protobuf structures over HTTP.

Recently, ankiweb change it's API and this changed was drastic.
They moved from html forms and bare http-requests to Protobuf
communication and sending binary Protobuf structures over http.

These are the Protobuf files used by ankiweb I handcrafted from
the frontend.
The version is fixed to work with current python version.
I picked it up from the error:
```
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
```
@szobov szobov merged commit a763909 into master Aug 1, 2023
1 check passed
@szobov szobov deleted the new-anki-api branch August 1, 2023 10:40
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.

1 participant