update README

This commit is contained in:
Vitaly Gashkov
2025-08-23 23:49:21 +05:00
parent 34b033ef57
commit 163993824a
+7 -6
View File
@@ -1,6 +1,6 @@
# Crextractor # Crextractor
Utility for extracting secrets from Crunchyroll mobile app Utility for extracting credentials from the Crunchyroll Android app
## Prerequisites ## Prerequisites
@@ -19,13 +19,14 @@ npm i crextractor
```js ```js
async function main() { async function main() {
const url = 'https://raw.githubusercontent.com/vitalygashkov/crextractor/refs/heads/main/secrets.json'; const url = 'https://raw.githubusercontent.com/vitalygashkov/crextractor/refs/heads/main/credentials.tv.json';
const data = await fetch(url).then((response) => response.json()); const data = await fetch(url).then((response) => response.json());
// You can use the extracted secrets to obtain access tokens for Crunchyroll APIs // 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', { const response = await fetch('https://beta-api.crunchyroll.com/auth/v1/token', {
headers: { headers: {
Authorization: data.authorization, Authorization: data.authorization,
'User-Agent': 'Crunchyroll/ANDROIDTV/3.42.1_22267 (Android 16; en-US; sdk_gphone64_x86_64)',
// ... // ...
}, },
method: 'POST', method: 'POST',
@@ -39,9 +40,9 @@ async function main() {
#### Library #### Library
```js ```js
import { extractSecrets } from 'crextractor'; import { extract } from 'crextractor';
const { id, secret, encoded, authorization } = await extractSecrets(); const { id, secret, encoded, authorization } = await extract();
// Do something with the extracted secrets // Do something with the extracted secrets
``` ```
@@ -49,10 +50,10 @@ const { id, secret, encoded, authorization } = await extractSecrets();
#### Command-line interface #### Command-line interface
```bash ```bash
npx crextractor npx crextractor --target mobile --output ./credentials.mobile.json
``` ```
> Results will be printed to the console and saved to `secrets.json` file > Results will be printed to the console and saved to `credentials.mobile.json` file. By default, the target is TV, but you can change it with `--target mobile` option.
## License ## License