diff --git a/crunchy.ts b/crunchy.ts index aba65c4..0af1aec 100644 --- a/crunchy.ts +++ b/crunchy.ts @@ -1746,7 +1746,7 @@ export default class Crunchy implements ServiceClass { const sessionId = new Date().getUTCMilliseconds().toString().padStart(3, '0') + process.hrtime.bigint().toString().slice(0, 13); console.info('Decryption Needed, attempting to decrypt'); - const decReq = await this.req.getData('https://pl.crunchyroll.com/drm/v1/auth', { + const decReq = await this.req.getData(`${api.drm}`, { 'method': 'POST', 'body': JSON.stringify({ 'accounting_id': 'crunchyroll', diff --git a/modules/module.api-urls.ts b/modules/module.api-urls.ts index c40c67c..8e476a1 100644 --- a/modules/module.api-urls.ts +++ b/modules/module.api-urls.ts @@ -33,6 +33,7 @@ export type APIType = { cms: string beta_browse: string beta_cms: string, + drm: string; /** * Web Header */ @@ -82,6 +83,7 @@ const api: APIType = { cms: `${domain.api_beta}/content/v2/cms`, beta_browse: `${domain.api_beta}/content/v1/browse`, beta_cms: `${domain.api_beta}/cms/v2`, + drm: `${domain.api_beta}/drm/v1/auth`, crunchyAuthHeader: {}, cruncyhAuthHeaderMob: {}, crunchyAuthHeaderSwitch: {},