mirror of
https://github.com/anidl/multi-downloader-nx.git
synced 2026-03-11 17:45:30 +00:00
removed useless old crunchy login api endpoint
This commit is contained in:
parent
aae69e6494
commit
2c50156046
2 changed files with 6 additions and 9 deletions
|
|
@ -265,7 +265,7 @@ export default class Crunchy implements ServiceClass {
|
|||
headers: {...api.crunchyAuthHeader, Authorization: `Basic ${await this.productionToken()}`},
|
||||
body: authData
|
||||
};
|
||||
const authReq = await this.req.getData(api.beta_auth, authReqOpts);
|
||||
const authReq = await this.req.getData(api.auth, authReqOpts);
|
||||
if(!authReq.ok || !authReq.res){
|
||||
console.error('Authentication failed!');
|
||||
return { isOk: false, reason: new Error('Authentication failed') };
|
||||
|
|
@ -293,7 +293,7 @@ export default class Crunchy implements ServiceClass {
|
|||
headers: {...api.crunchyAuthHeader, Authorization: `Basic ${await this.productionToken()}`},
|
||||
body: authData
|
||||
};
|
||||
const authReq = await this.req.getData(api.beta_auth, authReqOpts);
|
||||
const authReq = await this.req.getData(api.auth, authReqOpts);
|
||||
if(!authReq.ok || !authReq.res){
|
||||
console.error('Anonymous Authentication failed!');
|
||||
return;
|
||||
|
|
@ -350,7 +350,7 @@ export default class Crunchy implements ServiceClass {
|
|||
headers: {...api.crunchyAuthHeader, Authorization: `Basic ${await this.productionToken()}`, Cookie: `etp_rt=${refreshToken}`},
|
||||
body: authData
|
||||
};
|
||||
const authReq = await this.req.getData(api.beta_auth, authReqOpts);
|
||||
const authReq = await this.req.getData(api.auth, authReqOpts);
|
||||
if(!authReq.ok || !authReq.res){
|
||||
console.error('Token Authentication failed!');
|
||||
if (authReq.res?.status == 400) {
|
||||
|
|
@ -393,7 +393,7 @@ export default class Crunchy implements ServiceClass {
|
|||
headers: {...api.crunchyAuthHeader, Authorization: `Basic ${await this.productionToken()}`, Cookie: `etp_rt=${this.token.refresh_token}`},
|
||||
body: authData
|
||||
};
|
||||
const authReq = await this.req.getData(api.beta_auth, authReqOpts);
|
||||
const authReq = await this.req.getData(api.auth, authReqOpts);
|
||||
if(!authReq.ok || !authReq.res){
|
||||
console.error('Token Refresh Failed!');
|
||||
if (authReq.res?.status == 400) {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ export type APIType = {
|
|||
session: string
|
||||
collections: string
|
||||
// beta api
|
||||
beta_auth: string
|
||||
defaultUserAgent: string,
|
||||
beta_profile: string
|
||||
beta_cmsToken: string
|
||||
|
|
@ -59,14 +58,12 @@ const api: APIType = {
|
|||
rss_gid: `${domain.www}/syndication/feed?type=episodes&group_id=`, // &lang=enUS
|
||||
media_page: `${domain.www}/media-`,
|
||||
series_page: `${domain.www}/series-`,
|
||||
auth: `${domain.www}/login`,
|
||||
auth: `${domain.api_beta}/auth/v1/token`,
|
||||
// mobile api
|
||||
search3: `${domain.api}/autocomplete.0.json`,
|
||||
session: `${domain.api}/start_session.0.json`,
|
||||
collections: `${domain.api}/list_collections.0.json`,
|
||||
// new api
|
||||
beta_auth: `${domain.api_beta}/auth/v1/token`,
|
||||
// This User-Agent bypasses Cloudflare security by the newer Endpoint
|
||||
// This User-Agent bypasses Cloudflare security of the newer Endpoint
|
||||
defaultUserAgent: 'Crunchyroll/4.75.0 (bundle_identifier:com.crunchyroll.iphone; build_number:4100608.433889621) iOS/18.3.2 Gravity/4.75.0',
|
||||
beta_profile: `${domain.api_beta}/accounts/v1/me/profile`,
|
||||
beta_cmsToken: `${domain.api_beta}/index/v2`,
|
||||
|
|
|
|||
Loading…
Reference in a new issue