Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const got = require('got');
- const url = require('url');
- const querystring = require('querystring');
- module.exports = ripper;
- async function ripper(trakt_data) {
- try {
- const slug = trakt_data.ids.slug.split('-').slice(0, -1).join('-');
- const request_url = `https://flixanity.io/movie/${slug}`;
- const streams = [];
- let response = await got(request_url);
- const html = response.body;
- const idEL = html.match(/elid = "(\d+)"/)[1];
- response = await got.post('https://flixanity.io/ajax/gonlflhyad.php', {
- headers: {
- Host: 'flixanity.io',
- Connection: 'keep-alive',
- Origin: 'https://flixanity.io',
- Authorization: 'Bearer false',
- 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
- Accept: 'application/json, text/javascript, */*; q=0.01',
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36',
- 'X-Requested-With': 'XMLHttpRequest',
- Referer: `https://flixanity.io/movie/${slug}`,
- 'Accept-Language': 'en-US,en;q=0.9'
- },
- body: querystring.stringify({
- action: 'getMovieEmb',
- idEl: idEL,
- token: 'eCNBuxFGpRmFlWjUJjmjguCJI',
- nopop: ''
- })
- });
- const sources = JSON.parse(response.body);
- for (const index in sources) {
- const source = sources[index];
- const stream = source.embed.match(/src="(.+?)"/)[1];
- const uri = new url.URL(stream);
- streams.push({
- host: 'Flixanity',
- server: uri.host,
- source: stream,
- quality: source.type.split(' - ')[1]
- });
- }
- return streams;
- } catch (error) {
- console.log(error);
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement