Skip to content

Commit

Permalink
Emulate Crunchyroll desktop app instead of phone
Browse files Browse the repository at this point in the history
the iPhone API is sending 480p and using http instead of https
smart :^)
  • Loading branch information
remixz committed May 18, 2017
1 parent da539f6 commit 89ed0fc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/lib/api.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import axios, {CancelToken} from 'axios'

export const ACCESS_TOKEN = 'vdsWT3hI0V99etr'
export const DEVICE_TYPE = 'com.crunchyroll.iphone'
export const ACCESS_TOKEN = 'LNDJgOit5yaRIWN'
export const DEVICE_TYPE = 'com.crunchyroll.windows.desktop'
export const LOCALE = 'enUS'
export const VERSION = '3007.1'
export const VERSION = '1.1.20.0'
export const CONNECTIVITY_TYPE = 'ethernet'
export const UMI_SERVER = process.env.NODE_ENV === 'production' ? 'https://umi-watch-api.now.sh' : 'http://localhost:3001'

let source = CancelToken.source()
Expand All @@ -14,7 +15,8 @@ export default function api (opts) {
url: `https://api.crunchyroll.com/${opts.route}.0.json`,
params: !opts.data ? Object.assign({}, opts.params, {
locale: LOCALE,
version: VERSION
version: VERSION,
connectivity_type: CONNECTIVITY_TYPE
}) : null,
data: opts.data,
cancelToken: opts.route !== 'start_session' ? source.token : null
Expand Down

0 comments on commit 89ed0fc

Please sign in to comment.