Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- base: https://v8.kuramanime.tel/
- by : wolep, esm
- req : oota kun +62 831-3609-XXXX
- */
- import axios from "axios"
- const run = async (urlPost) => {
- const client = new axios.create({
- baseURL: "https://v8.kuramanime.tel",
- headers: {
- "accept-encoding": "gzip, deflate, br"
- }
- })
- const { data: html } = await client.get(urlPost)
- const kps = html.match(/data-kps="(.+?)">/)?.[1]
- const { data: js } = await client.get(`/assets/js/${kps}.js`)
- const window = {}; eval(`${js}`)
- const { MIX_PAGE_TOKEN_KEY,
- MIX_STREAM_SERVER_KEY,
- MIX_AUTH_ROUTE_PARAM
- } = window.process.env
- const { data: txt } = await client.get(`/assets/${MIX_AUTH_ROUTE_PARAM}`)
- const url = new URL(urlPost)
- url.search = new URLSearchParams({
- [MIX_PAGE_TOKEN_KEY]: txt,
- [MIX_STREAM_SERVER_KEY]: "kuramadrive",
- page: 1
- })
- const { data: html2 } = await client.get(url.toString())
- const match = html2.matchAll(/<source id="source\d+" src="(?<url>.+?)" type="(?<type>.+?)" size="(?<size>.+?)"/gm)
- const player = Array.from(match).map(v => {
- v.groups.url = v.groups.url.replaceAll("&", "&")
- return { ...v.groups }
- })
- const urlUnduhLainnya = url.toString()
- const result = { player, urlUnduhLainnya }
- return result
- }
- // cara pakai
- run("https://v8.kuramanime.tel/anime/3775/sakamoto-days-part-2/episode/6")
- .then(console.log)
- .catch(e => console.log("error"))
- /* output
- {
- player: [
- {
- url: 'https://leshea.my.id/k.......oP-WsPcKVhRR-4&cce=1',
- type: 'video/mp4',
- size: '720'
- },
- {
- url: 'https://leshea.my.id/kdri......xexV6QMFUe0U&cce=1',
- type: 'video/mp4',
- size: '480'
- },
- {
- url: 'https://leshea.my......R-4&cce=1',
- type: 'video/mp4',
- size: '360'
- }
- ],
- urlUnduhLainnya: 'https://v8.kuramanime.tel/ani....Nrut=kuramadrive&page=1'
- }*/
Advertisement
Add Comment
Please, Sign In to add comment