-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f06bf2f
commit 588bec3
Showing
10 changed files
with
198 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,36 @@ | ||
# lyrntpy | ||
A api wrapper for lyrnt`s api in python | ||
|
||
# How to make the .env file | ||
In order to create a `.env` file you need 3 cookies: | ||
- `_TOKEN_DO_NOT_SHARE` | ||
- `temp-discord-token` | ||
- `cf_clearance` | ||
|
||
The `_TOKEN_DO_NOT_SHARE` cookie is required to authenticate with the lyrnt api. | ||
|
||
The `temp-discord-token` cookie is only needed when creating an account (to my knowledge) so it can probaly left empty but i would stil set it. | ||
|
||
The `cf_clearance` is used to authenticate with cloudflare and use the api and not be blocked. This cookie is known for expirering quickly, for now the | ||
solution is to manualy copy the cookie from a browser and paste it it (i am working on an automatic system). | ||
|
||
Now that we know what each cookie does, how to actually get them? (please note the tutorial for getting the cookies is for firefox) | ||
|
||
Firstly navigate to [lyrnt](https://lyrnt.com) and press `Control+S+I`, you should be meet with this | ||
 | ||
|
||
Now navigate to the `Storage` tab | ||
 | ||
|
||
And click on `Cookies > https://lyntr.com` | ||
 | ||
|
||
Now copy the `_TOKEN_DO_NOT_SHARE` cookie to the file `.env` to a variable named `TOKEN`, the `temp-discord-token` cookie to `temp-discord-token` and the `cf_clearance` cookie to `cf_clearance`. | ||
|
||
If you do all these steps correctly you should be able to start implementing the wrapper in your code. | ||
|
||
Happy Codeing. | ||
|
||
# ToDo | ||
- [ ] Add photo support for lynting | ||
- [ ] Add auto login so manual pasting cookies from browser to .env is not required | ||
- [ ] Add auto cloudflare cookies collector from browser to .env is not required |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
python-dotenv | ||
requests | ||
cloudscraper | ||
requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters