|
1 | 1 | // ==UserScript== |
2 | 2 | // @name AniLINK - Episode Link Extractor |
3 | 3 | // @namespace https://greasyfork.org/en/users/781076-jery-js |
4 | | -// @version 6.24.0 |
| 4 | +// @version 6.25.0 |
5 | 5 | // @description Stream or download your favorite anime series effortlessly with AniLINK! Unlock the power to play any anime series directly in your preferred video player or download entire seasons in a single click using popular download managers like IDM. AniLINK generates direct download links for all episodes, conveniently sorted by quality. Elevate your anime-watching experience now! |
6 | 6 | // @icon https://www.google.com/s2/favicons?domain=animepahe.ru |
7 | 7 | // @author Jery |
|
47 | 47 | // @match https://animekai.cc/watch/* |
48 | 48 | // @match https://anikai.to/watch/* |
49 | 49 | // @match https://yflix.to/watch/* |
| 50 | +// @match https://anime.uniquestream.net/*/*/* |
50 | 51 | // @grant GM_registerMenuCommand |
51 | 52 | // @grant GM_xmlhttpRequest |
52 | 53 | // @grant GM.xmlHttpRequest |
@@ -858,6 +859,21 @@ const Websites = [ |
858 | 859 | }, |
859 | 860 | _enc: async s => await GM_fetch(`https://enc-dec.app/api/enc-movies-flix?text=${s}`).then(r => r.json()).then(d => d.result), |
860 | 861 | _dec: async s => await GM_fetch(`https://enc-dec.app/api/dec-movies-flix?text=${s}`).then(r => r.json()).then(d => d.result.url), |
| 862 | + }, |
| 863 | + { |
| 864 | + name: 'UniqueStream', |
| 865 | + url: ['anime.uniquestream.net/series', 'anime.uniquestream.net/watch'], |
| 866 | + extractEpisodes: async function* (status) { |
| 867 | + if (location.href.includes('/watch/')) { _$('.episode-series-link').click(); await new Promise(resolve => setTimeout(resolve, 2000)); window.scrollBy(0, 1000); await new Promise(resolve => setTimeout(resolve, 2000)); }; // Navigate to episode list if on watch page |
| 868 | + for (const epElm of await applyEpisodeRangeFilter([..._$$('a[href*="/watch/"]')].slice(1))) |
| 869 | + yield* yieldEpisodesFromPromises([epElm].map(async epElm => { try { |
| 870 | + const [, epNum, epTitle] = epElm.querySelector('.episode-title').textContent.match(/(?:S\d+.+)?E-?(\d+|\w+) - (.+)/); |
| 871 | + status.text = `Extracting Episodes ${epNum}...`; |
| 872 | + const d = await fetch(`https://anime.uniquestream.net/api/v1/episode/${epElm.href.split('/')[4]}/media/dash/ja-JP`).then(r => r.json()); |
| 873 | + const links = Object.fromEntries([d.dash, d.hls, ...(d.versions?.dash || []), ...(d.versions?.hls || [])].filter(Boolean).map(s => [`${s.playlist.includes('.mpd') ? 'dash' : 'hls'}-${s.locale}`, { stream: s.playlist, type: s.playlist.includes('.mpd') ? 'mpd' : 'm3u8', tracks: (s.hard_subs || []).map(h => ({ file: h.playlist, label: h.locale, kind: 'caption' })) }])); |
| 874 | + return !Object.keys(links).length ? null : new Episode(epNum, _$('.series-title').textContent, links, epElm.querySelector('img')?.src || '', epTitle); |
| 875 | + } catch (e) { showToast(`error ${e.status}: ${e.message}`); return null; } })); |
| 876 | + } |
861 | 877 | } |
862 | 878 | ]; |
863 | 879 |
|
|
0 commit comments