mirror of
https://github.com/vitalygashkov/crextractor.git
synced 2026-07-15 17:40:03 +02:00
update README
This commit is contained in:
@@ -15,6 +15,27 @@ npm i crextractor
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
### Fetching already extracted secrets
|
||||||
|
|
||||||
|
```js
|
||||||
|
async function main() {
|
||||||
|
const url = 'https://raw.githubusercontent.com/vitalygashkov/crextractor/refs/heads/main/secrets.json';
|
||||||
|
const data = await fetch(url).then((response) => response.json());
|
||||||
|
|
||||||
|
// You can use the extracted secrets to obtain access tokens for Crunchyroll APIs
|
||||||
|
const response = await fetch('https://beta-api.crunchyroll.com/auth/v1/token', {
|
||||||
|
headers: {
|
||||||
|
Authorization: data.authorization,
|
||||||
|
// ...
|
||||||
|
},
|
||||||
|
method: 'POST',
|
||||||
|
body: JSON.stringify({
|
||||||
|
// ...
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
#### Library
|
#### Library
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|||||||
Reference in New Issue
Block a user