daily pastebin goal
94%
SHARE
TWEET

Untitled

a guest Jul 12th, 2018 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const got = require('got');
  2. const url = require('url');
  3. const querystring = require('querystring');
  4.  
  5. module.exports = ripper;
  6.  
  7. async function ripper(trakt_data) {
  8.     try {
  9.         const slug = trakt_data.ids.slug.split('-').slice(0, -1).join('-');
  10.         const request_url = `https://flixanity.io/movie/${slug}`;
  11.         const streams = [];
  12.  
  13.         let response = await got(request_url);
  14.  
  15.         const html = response.body;
  16.         const idEL = html.match(/elid = "(\d+)"/)[1];
  17.  
  18.         response = await got.post('https://flixanity.io/ajax/gonlflhyad.php', {
  19.             headers: {
  20.                 Host: 'flixanity.io',
  21.                 Connection: 'keep-alive',
  22.                 Origin: 'https://flixanity.io',
  23.                 Authorization: 'Bearer false',
  24.                 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
  25.                 Accept: 'application/json, text/javascript, */*; q=0.01',
  26.                 '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',
  27.                 'X-Requested-With': 'XMLHttpRequest',
  28.                 Referer: `https://flixanity.io/movie/${slug}`,
  29.                 'Accept-Language': 'en-US,en;q=0.9'
  30.             },
  31.             body: querystring.stringify({
  32.                 action: 'getMovieEmb',
  33.                 idEl: idEL,
  34.                 token: 'eCNBuxFGpRmFlWjUJjmjguCJI',
  35.                 nopop: ''
  36.             })
  37.         });
  38.  
  39.         const sources = JSON.parse(response.body);
  40.         for (const index in sources) {
  41.             const source = sources[index];
  42.             const stream = source.embed.match(/src="(.+?)"/)[1];
  43.             const uri = new url.URL(stream);
  44.  
  45.             streams.push({
  46.                 host: 'Flixanity',
  47.                 server: uri.host,
  48.                 source: stream,
  49.                 quality: source.type.split(' - ')[1]
  50.             });
  51.         }
  52.  
  53.         return streams;
  54.     } catch (error) {
  55.         console.log(error);
  56.         return null;
  57.     }
  58. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top