crextractor 1.3.2 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/crextractor.js +5 -8
  2. package/package.json +1 -1
package/crextractor.js CHANGED
@@ -16,13 +16,10 @@ const downloadMobileApk = async () => {
16
16
 
17
17
  const downloadTvApk = async () => {
18
18
  const source = 'https://webservices.aptoide.com/webservices/3/getApkInfo';
19
- const formData = new FormData();
20
- formData.append('identif', 'id:71666229');
21
- formData.append('mode', 'json');
22
- const response = await fetch(source, {
23
- method: 'POST',
24
- body: formData,
25
- });
19
+ const body = new FormData();
20
+ body.append('identif', 'id:72075737');
21
+ body.append('mode', 'json');
22
+ const response = await fetch(source, { method: 'POST', body });
26
23
  const json = await response.json();
27
24
  const url = json.apk.path;
28
25
  const filepath = join(process.cwd(), 'crunchyroll.apk');
@@ -100,7 +97,7 @@ const extract = async ({ target = 'mobile', output, cleanup = false } = {}) => {
100
97
  console.log('Downloading APK...');
101
98
  const apkPath = target === 'tv' ? await downloadTvApk() : await downloadMobileApk();
102
99
 
103
- if (existsSync(apkPath)) {
100
+ if (!existsSync(apkPath)) {
104
101
  console.error('Unable to find APK (possibly a download error)');
105
102
  return;
106
103
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crextractor",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "Utility for extracting credentials from the Crunchyroll Android app",
5
5
  "main": "crextractor.js",
6
6
  "bin": {