migrate to got

main
aria 4 weeks ago
parent 6a543ceaef
commit a8e3190f79
Signed by: a
GPG Key ID: E851AE999FFCBC37
  1. 2
      config.example.json
  2. 4
      docs/dev-docs/CONFIG.md
  3. 4
      docs/dev-docs/CONTRIBUTING-EXT/README.md
  4. 14
      docs/dev-docs/CONTRIBUTING-EXT/WRITING-EXTRACTORS.md
  5. 8
      docs/general-docs/DIFFERENCES.md
  6. 42
      docs/general-docs/SITES.md
  7. 2
      docs/general-docs/TOR.md
  8. 14
      extractors/1link.js
  9. 18
      extractors/boost.js
  10. 20
      extractors/boostme.js
  11. 17
      extractors/carrd.js
  12. 16
      extractors/cpmlink.js
  13. 21
      extractors/cshort.js
  14. 24
      extractors/dlp.js
  15. 43
      extractors/generic.js
  16. 12
      extractors/ity.js
  17. 14
      extractors/karung.js
  18. 22
      extractors/linktree.js
  19. 30
      extractors/linkvertise.js
  20. 6
      extractors/longwpsafe.js
  21. 14
      extractors/mboost.js
  22. 14
      extractors/mshake.js
  23. 14
      extractors/ola.js
  24. 20
      extractors/ouo.js
  25. 14
      extractors/psa.js
  26. 12
      extractors/rekonise.js
  27. 14
      extractors/show.js
  28. 18
      extractors/shst.js
  29. 25
      extractors/socialUnlock.js
  30. 18
      extractors/tei.js
  31. 33
      extractors/thinfi.js
  32. 10
      extractors/urlsopen.js
  33. 14
      lib.js
  34. 532
      package-lock.json
  35. 2
      package.json

@ -15,7 +15,7 @@
"fastforward": true,
"alert": "",
"defaults": {
"axios": {
"got": {
"headers": {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",

@ -22,9 +22,9 @@ This is a quick start guide on configuring your BIFM server.
"fastforward": true, // accepted values: true, false
"alert": "", // any string that isn't ""
"defaults": { // defaults for scrapers
"axios": { // axios-type scrapers
"got": { // got-type scrapers
"headers": {
// all headers sent (by default) in axios
// all headers sent (by default) in got
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0", // default user agent, currently firefox 102.0 on linux
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", // default accept header
"Accept-Encoding": "gzip, deflate", // default accept encoding

@ -4,7 +4,7 @@ If you'd like to contribute your own code, first all we want to say thank you fo
First, we recommend learning to reverse engineer website in general before anything. This means knowing your way around DevTools (otherwise known as "Inspect Element"), among other factors of your browser and the site you're going to attempt writing code to bypass.
Specifically, you also should know how to write code in Node.js, and have experience with the `axios`, `puppeteer` and `cheerio` packages.
Specifically, you also should know how to write code in Node.js, and have experience with the `got`, `puppeteer` and `cheerio` packages.
## Guidelines for New Extractors
@ -12,6 +12,6 @@ The site must not already solveable under normal circumstances with BIFM. A good
## Guidelines for Updating Extractors
Your update must improve the extractor by either eliminating the need for a CAPTCHA solver, moving from Puppeteer to Axios, or simply fixing a bug.
Your update must improve the extractor by either eliminating the need for a CAPTCHA solver, moving from Puppeteer to got, or simply fixing a bug.
If you think you're ready, you can move onto the [basics of writing a bypass](./WRITING-EXTRACTORS.md)

@ -16,14 +16,14 @@ For example, if your module was going to be for a website called `link.com`, nam
## Choosing extractor type
When in doubt, use `axios` & `cheerio` over `puppeteer`. Puppeteer can be very useful for getting around sites that use CAPTCHAs or already have bypasses in [FastForward](https://fastforward.team), but Puppeteer can take up resources very quickly, as it's an entire browser window (hidden, of course) just to scrape a webpage.
When in doubt, use `got` & `cheerio` over `puppeteer`. Puppeteer can be very useful for getting around sites that use CAPTCHAs or already have bypasses in [FastForward](https://fastforward.team), but Puppeteer can take up resources very quickly, as it's an entire browser window (hidden, of course) just to scrape a webpage.
### Axios + Cheerio
### Got + Cheerio
Copy and paste this template into your extractor.
```js
const axios = require("axios");
const got = require("got");
const cheerio = require("cheerio");
const lib = require("../lib");
@ -32,7 +32,7 @@ module.exports = {
requiresCaptcha: false,
get: async function(url, opt) {
if (lib.config().debug == true) console.log("[scraper] Requesting page...");
let resp = await axios({
let resp = await got({
method: "GET",
url: url,
headers: {
@ -42,12 +42,12 @@ module.exports = {
});
if (lib.config().debug == true) console.log("[scraper] Got page. Parsing page...");
let $ = cheerio.load(resp.data);
let $ = cheerio.load(resp.body);
// do stuff with resp.data here
// do stuff with resp.body here
// or cheerio via $
let r = resp.data.split("whatever")[2]; // whatever your end result is, dont use this obviously though, it's an example
let r = resp.body.split("whatever")[2]; // whatever your end result is, dont use this obviously though, it's an example
return r;
}
};

@ -1,8 +0,0 @@
# Differences between the rewrites
|Feature|Old Version|New Version|
|---|---|---|
|**License?**|The Unlicense|AGPL|
|**Compatibility?**|Only uses the NPM package `got`.|Compatible with `puppeteer-extra` and `axios`.|
*will add more eventually*

@ -8,46 +8,46 @@ Redirects not directly linking to our site may be NSFW and are not endorsements
|Domain|Method|Needs CAPTCHA solver?|Example Links|Additional Domains|Additional Notes|
|---|---|---|---|---|---|
|**`1bit.space`**|Puppeteer + Adblocker + Stealth|Yes||Need a SFW and legal example |
|**`1link.club`**|Axios|No|[http://1link.club/77679](http://1link.club/77679)|||
|**`adf.ly`**|Axios|No|[http://usheethe.com/T3F5](http://usheethe.com/T3F5)|`usheethe.com`|There is not a complete list of domains under adf.ly's net that I could find, but there is an algorythm for finding adf.ly links and automatically bypassing it.|
|**`1link.club`**|Got|No|[http://1link.club/77679](http://1link.club/77679)|||
|**`adf.ly`**|Got|No|[http://usheethe.com/T3F5](http://usheethe.com/T3F5)|`usheethe.com`|There is not a complete list of domains under adf.ly's net that I could find, but there is an algorythm for finding adf.ly links and automatically bypassing it.|
|**`adlinkfly`**|Puppeteer + Stealth|Sometimes, but always required|[https://pdiskshortener.com/6I2CR2](https://pdiskshortener.com/6I2CR2), [https://dz-linkk.com/N2xFP](https://dz-linkk.com/N2xFP), [https://www.shortly.xyz/r/74fee2919710769f09131da1beb8243e](https://www.shortly.xyz/r/74fee2919710769f09131da1beb8243e)|`adlinkfly.mightyscripts.xyz`, `pdiskshortener.com`, `dzlinkk.com`|Like adf.ly, there is not a list of adlinkfly sites, but there is an algorithm to find and bypass them.|
|**`aylink.co`**|Puppeteer + Stealth|Yes|[https://aylink.co/xay664](https://aylink.co/xay664) redirects to `https://mega.nz/folder/hpIAnRLS#fJZX651qRZdf_DU2Y_k0kA`||
|**`bc.vc`**|Puppeteer + Stealth|No|[https://bc.vc/vQesLIh](https://bc.vc/vQesLIh) redirects to `https://universal-bypass.org/`.||
|**`boost.ink`**|Axios|No|[https://boost.ink/c5bba](https://boost.ink/c5bba)|`bst.gg`, `bst.wtf`, `booo.st`||
|**`boostme.link`**|Axios|No|[https://boostme.link/iX9Krf](https://boostme.link/iX9Krf)||
|**`cpmlink.net`**|Axios|Yes|[https://cpmlink.net/i7FyAQ](https://cpmlink.net/i7FyAQ)||
|**`boost.ink`**|Got|No|[https://boost.ink/c5bba](https://boost.ink/c5bba)|`bst.gg`, `bst.wtf`, `booo.st`||
|**`boostme.link`**|Got|No|[https://boostme.link/iX9Krf](https://boostme.link/iX9Krf)||
|**`cpmlink.net`**|Got|Yes|[https://cpmlink.net/i7FyAQ](https://cpmlink.net/i7FyAQ)||
|**`cutw.in`**|Puppeteer + Adblocker + Stealth|Yes|[https://cutw.in/8q9wzl](https://cutw.in/8q9wzl)|||
|**`cshort.org`**|Axios|No|[https://cshort.org/8i8dwPx0](https://cshort.org/8i8dwPx0)|
|**`DaddyScripts`**|Axios|Sometimes, not always required|[https://lnk.snahp.eu/EBRs14BxyZ5oIlvrEx4EZGPlrwGm31VeNZ1Uo](https://lnk.snahp.eu/EBRs14BxyZ5oIlvrEx4EZGPlrwGm31VeNZ1Uo) (no password), [https://lnk.snahp.eu/W4hPgdadk7F9WtY5hb00uCdWzHZK5n5kt32ZG](https://lnk.snahp.eu/W4hPgdadk7F9WtY5hb00uCdWzHZK5n5kt32ZG) (password: `bifm`)|||
|**`cshort.org`**|Got|No|[https://cshort.org/8i8dwPx0](https://cshort.org/8i8dwPx0)|
|**`DaddyScripts`**|Got|Sometimes, not always required|[https://lnk.snahp.eu/EBRs14BxyZ5oIlvrEx4EZGPlrwGm31VeNZ1Uo](https://lnk.snahp.eu/EBRs14BxyZ5oIlvrEx4EZGPlrwGm31VeNZ1Uo) (no password), [https://lnk.snahp.eu/W4hPgdadk7F9WtY5hb00uCdWzHZK5n5kt32ZG](https://lnk.snahp.eu/W4hPgdadk7F9WtY5hb00uCdWzHZK5n5kt32ZG) (password: `bifm`)|||
|**`droplink.co`**|Puppeteer|No|[https://droplink.co/VOpK](https://droplink.co/VOpK)|||
|**`exe.io`**|Puppeteer + Adblock|Yes|[https://exe.io/ZaKsUgDc](https://exe.io/ZaKsUgDc)|`exey.io`||
|**`ez4short.com`**|Puppeteer + Adblocker + Stealth|No|[https://ez4short.com/nzcU](https://ez4short.com/nzcU)|||
|**`fc.lc`**|Puppeteer + Adblocker + Stealth|No|[https://fc-lc.com/mWGCzBwu](https://fc-lc.com/mWGCzBwu)|`fc-lc.com`|Not officially a seperate extractor, this uses the `exeio` extractor.|
|**`gplinks.co`**|Puppeteer + Adblocker + Stealth|Yes||`gplinks.in`|Need example link that is SFW and legal.|
|**`hrshort.com`**|Puppeteer|No|[https://open.crazyblog.in/tXDGig](https://open.crazyblog.in/tXDGig)|`crazyblog.in`, `open.crazyblog.in`, `redd.crazyblog.in`||
|**`ity.im`**|Axios|No|[http://ity.im/1QZh2](http://ity.im/1QZh2)|||
|**`karung.in`**|Axios|No|[http://karung.in/Gyucc](http://karung.in/Gyucc) redirects to `https://drive.google.com/uc?id=0B263gKU-C09_WW5rbURLeXN5QXc&export=download`.||Passworded links are currently not supported.|
|**`ity.im`**|Got|No|[http://ity.im/1QZh2](http://ity.im/1QZh2)|||
|**`karung.in`**|Got|No|[http://karung.in/Gyucc](http://karung.in/Gyucc) redirects to `https://drive.google.com/uc?id=0B263gKU-C09_WW5rbURLeXN5QXc&export=download`.||Passworded links are currently not supported.|
|**`keeplinks.org`**|Puppeteer + Adblocker + Stealth|No|[https://www.keeplinks.org/p100/62b878489fbc5](https://www.keeplinks.org/p100/62b878489fbc5)||Passworded links don't need a password due to a cookie exploit.|
|**`linkvertise.net`**|Axios|Yes|[https://linkvertise.com/425581/example1](https://linkvertise.com/425581/example1) for regular redirects, [https://link-target.net/425581/example](https://link-target.net/425581/example) for a paste|`linkvertise.com`, `up-to-down.net`, `link-to.net`, `direct-link.net`, `linkvertise.download`, `file-link.net`, `link-center.net`, `link-target.net`, `link-hub.net`||
|**`linkvertise.net`**|Got|Yes|[https://linkvertise.com/425581/example1](https://linkvertise.com/425581/example1) for regular redirects, [https://link-target.net/425581/example](https://link-target.net/425581/example) for a paste|`linkvertise.com`, `up-to-down.net`, `link-to.net`, `direct-link.net`, `linkvertise.download`, `file-link.net`, `link-center.net`, `link-target.net`, `link-hub.net`||
|**`link1s.com`**|Puppeteer + Adblocker + Stealth|No|||Need example link that is SFW and legal.|
|**`lnk.parts`**|Puppeteer + Stealth|Yes|[https://lnkload.com/2z8aF](https://lnkload.com/2z8aF)|`link.tl`, `lnkload.com`||
|**`lnk2.cc`**|Puppeteer + Ad & Tracker Blocker + Stealth|Yes|[https://lnk2.cc/wd1J1](https://lnk2.cc/wd1J1)||
|**`mboost.me`**|Axios|No|[https://mboost.me/a/47n](https://mboost.me/a/47n) redirects to `https://www.nukevscity.com/hehehehaw5`|||
|**`mboost.me`**|Got|No|[https://mboost.me/a/47n](https://mboost.me/a/47n) redirects to `https://www.nukevscity.com/hehehehaw5`|||
|**`myl.li`**|Puppeteer + Ad & Tracker Blocker + Stealth|Yes|[https://myl.li/NOEgI6aOp3bF](https://myl.li/NOEgI6aOp3bF)|`mylink.vc`||
|**`oke.io`**|Puppeteer + Stealth|No|[https://oke.io/D3wL](https://oke.io/D3wL) redirects to a broken Mega.nz link.|||
|**`olamovies.cfd`**|Axios|No||`olamovies.top`|Need example link that is SFW and legal.|
|**`olamovies.cfd`**|Got|No||`olamovies.top`|Need example link that is SFW and legal.|
|**`ouo.io`**|Puppeteer + Stealth|Sometimes, only to bypass Cloudflare|[https://ouo.io/2dktqo](https://ouo.io/2dktqo)|`ouo.press`||
|**`psa.pm`**|Axios|No|||Need example link that is SFW and legal.|
|**`rekonise.com`**|Axios|No|[https://rekonise.com/bifm-jv7k6](https://rekonise.com/bifm-jv7k6)||
|**`sh.st`**|Axios|No|[http://ceesty.com/es47QR](http://ceesty.com/es47QR)|`ceesty.com`, `cestyy.com`, `clkme.me`, `clkmein.com`, `cllkme.com`, `corneey.com`, `destyy.com`, `festyy.com`, `gestyy.com`, `jnw0.me`, `xiw34.com`, `wiid.me`|The list to the right may not be 100% correct or complete.|
|**`shorturllink.in`**|Axios|No|[https://urlsopen.com/DC6F](https://urlsopen.com/DC6F)|`urlsopen.com`, `blog.textpage.xyz`, `short.url2go.in`||
|**`show.co`**|Axios|No|[https://show.co/HQrPtta](https://show.co/HQrPtta) redirects to `https://universal-bypass.org/`.||
|**`social-unlock.com`**|Axios|No|[https://social-unlock.com/417pK](https://social-unlock.com/417pK)|||
|**`psa.pm`**|Got|No|||Need example link that is SFW and legal.|
|**`rekonise.com`**|Got|No|[https://rekonise.com/bifm-jv7k6](https://rekonise.com/bifm-jv7k6)||
|**`sh.st`**|Got|No|[http://ceesty.com/es47QR](http://ceesty.com/es47QR)|`ceesty.com`, `cestyy.com`, `clkme.me`, `clkmein.com`, `cllkme.com`, `corneey.com`, `destyy.com`, `festyy.com`, `gestyy.com`, `jnw0.me`, `xiw34.com`, `wiid.me`|The list to the right may not be 100% correct or complete.|
|**`shorturllink.in`**|Got|No|[https://urlsopen.com/DC6F](https://urlsopen.com/DC6F)|`urlsopen.com`, `blog.textpage.xyz`, `short.url2go.in`||
|**`show.co`**|Got|No|[https://show.co/HQrPtta](https://show.co/HQrPtta) redirects to `https://universal-bypass.org/`.||
|**`social-unlock.com`**|Got|No|[https://social-unlock.com/417pK](https://social-unlock.com/417pK)|||
|**`srt.am`**|Puppeteer|No|[http://srt.am/e8kZ9m](http://srt.am/e8kZ9m) redirects to `https://www.google.com/`|`short.am`||
|**`tei.ai`**|Axios|No|[https://tei.ai/HOI4_1_11_11](https://tei.ai/HOI4_1_11_11) redirects to `https://www.mediafire.com/file/mmxskm3b1uanzfn/OG9134-HOI4FU1.rar/file`|`tii.ai`||
|**`thinfi.com`**|Axios|No|[https://thinfi.com/088ud](https://thinfi.com/088ud) (no password), [https://thinfi.com/088uk](https://thinfi.com/088uk) (password: `bifm`)||
|**`tei.ai`**|Got|No|[https://tei.ai/HOI4_1_11_11](https://tei.ai/HOI4_1_11_11) redirects to `https://www.mediafire.com/file/mmxskm3b1uanzfn/OG9134-HOI4FU1.rar/file`|`tii.ai`||
|**`thinfi.com`**|Got|No|[https://thinfi.com/088ud](https://thinfi.com/088ud) (no password), [https://thinfi.com/088uk](https://thinfi.com/088uk) (password: `bifm`)||
|**`try2link.com`**|Puppeteer + Adblocker|No|||Need example link that is SFW and legal.|
|**`wpsafelink`**|Axios|No|**Regular WPSafelink**: [https://demo-safelink.themeson.com/template1/?f7fbb8af](https://demo-safelink.themeson.com/template1/?f7fbb8af) redirects to `https://themeson.com/safelink/`**Long WPSafelink**: [https://pdiskshortener.in/svJ1](https://pdiskshortener.in/svJ1)|`demo-safelink.themeson.com`||
|**`wpsafelink`**|Got|No|**Regular WPSafelink**: [https://demo-safelink.themeson.com/template1/?f7fbb8af](https://demo-safelink.themeson.com/template1/?f7fbb8af) redirects to `https://themeson.com/safelink/`**Long WPSafelink**: [https://pdiskshortener.in/svJ1](https://pdiskshortener.in/svJ1)|`demo-safelink.themeson.com`||
|**`za.gl`**|Puppeteer + Adblocker + Stealth|No|[https://za.gl/JPk6](https://za.gl/JPk6)|`za.uy`, `zee.gl`||
## Other Sites

@ -44,7 +44,7 @@ The default file looks like [this](./CONFIG.md), you should change the `defaults
```js
"defaults": {
"axios": {
"got": {
"headers": {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"

@ -1,4 +1,4 @@
const axios = require("axios");
const got = require("got");
const cheerio = require("cheerio");
const lib = require("../lib");
@ -9,16 +9,16 @@ module.exports = {
try {
if (lib.config().debug == true) console.log("[1link] Requesting page...");
let h = lib.config().defaults?.axios.headers;
let h = lib.config().defaults?.got.headers;
if (opt.referer) {
h.Referer = opt.referer;
}
let proxy;
if (lib.config().defaults?.axios.proxy) {
if (lib.config().defaults?.axios.proxy?.type == "socks5") {
if (lib.config().defaults?.got.proxy) {
if (lib.config().defaults?.got.proxy?.type == "socks5") {
const agent = require("socks-proxy-agent");
let prox = `socks5://${lib.config().defaults?.axios.proxy?.host}:${lib.config().defaults?.axios.proxy?.port}`;
let prox = `socks5://${lib.config().defaults?.got.proxy?.host}:${lib.config().defaults?.got.proxy?.port}`;
try {
if ((new URL(prox).hostname == "localhost" || new URL(prox).hostname == "127.0.0.1") && new URL(proxy).port == "9050") {
proxy = {};
@ -33,7 +33,7 @@ module.exports = {
}
}
let resp = await axios({
let resp = await got({
method: "GET",
url: url,
headers: h,
@ -41,7 +41,7 @@ module.exports = {
});
if (lib.config().debug == true) console.log("[1link] Got page. Parsing page...");
let $ = cheerio.load(resp.data);
let $ = cheerio.load(resp.body);
if (lib.isUrl($("#download")[0]?.attribs?.href)) return $("#download")[0]?.attribs?.href;

@ -1,4 +1,4 @@
const axios = require("axios");
const got = require("got");
const cheerio = require("cheerio");
const lib = require("../lib");
@ -7,14 +7,14 @@ module.exports = {
requiresCaptcha: false,
get: async function(url, opt) {
try {
let h = lib.config().defaults?.axios.headers;
let h = lib.config().defaults?.got.headers;
if (opt.referer) {
h.Referer = opt.referer;
}
let proxy;
if (lib.config().defaults?.axios.proxy) {
if (lib.config().defaults?.axios.proxy?.type == "socks5") {
if (lib.config().defaults?.got.proxy) {
if (lib.config().defaults?.got.proxy?.type == "socks5") {
const agent = require("socks-proxy-agent");
try {
if ((new URL(prox).hostname == "localhost" || new URL(prox).hostname == "127.0.0.1") && new URL(proxy).port == "9050") {
@ -31,14 +31,14 @@ module.exports = {
}
if (lib.config().debug == true) console.log("[boost] Requesting page...");
let resp = await axios({
let resp = await got({
method: "GET",
url: url,
headers: h,
...proxy
});
let $ = cheerio.load(resp.data);
let $ = cheerio.load(resp.body);
// below isn't necessary, really but it's future proofing the script.
// it's going to look for the unlock script, get it and find the attribute that contains the script
@ -52,7 +52,11 @@ module.exports = {
if ($("script")[a].attribs && $("script")[a].attribs.src && $("script")[a].attribs.src.includes("unlock")) {
scr = $("script")[a].attribs;
if (lib.config().debug == true) console.log("[boost] Found unlock.js script. Requesting...");
let b = (await axios({url: `https://boost.ink${scr["src"]}`, ...proxy})).data;
let b = (await got(
{
url: `https://boost.ink${scr["src"]}`,
...proxy
})).body;
if (lib.config().debug == true) console.log("[boost] Got script. Searching for attribute needed to decode...");
attr = b.split(`dest=`)[1].split(`currentScript.getAttribute("`)[1].split(`"`)[0];
}

@ -1,4 +1,4 @@
const axios = require("axios");
const got = require("got");
const cheerio = require("cheerio");
const lib = require("../lib");
@ -8,16 +8,16 @@ module.exports = {
get: async function(url, opt) {
try {
if (lib.config().debug == true) console.log("[boostme] Requesting page...");
let h = lib.config().defaults?.axios.headers;
let h = lib.config().defaults?.got.headers;
if (opt.referer) {
h.Referer = opt.referer;
}
let proxy;
if (lib.config().defaults?.axios.proxy) {
if (lib.config().defaults?.axios.proxy?.type == "socks5") {
if (lib.config().defaults?.got.proxy) {
if (lib.config().defaults?.got.proxy?.type == "socks5") {
const agent = require("socks-proxy-agent");
let prox = `socks5://${lib.config().defaults?.axios.proxy?.host}:${lib.config().defaults?.axios.proxy?.port}`;
let prox = `socks5://${lib.config().defaults?.got.proxy?.host}:${lib.config().defaults?.got.proxy?.port}`;
if ((new URL(prox).hostname == "localhost" || new URL(prox).hostname == "127.0.0.1") && new URL(prox).port == "9050") {
proxy = {};
} else {
@ -28,20 +28,18 @@ module.exports = {
}
}
let resp = await axios({
let resp = await got({
method: "GET",
url: url,
headers: h,
...proxy,
validateStatus: function(stat) {
if (stat !== 403) return true;
}
throwHttpErrors: false,
});
let $ = cheerio.load(resp.data);
let $ = cheerio.load(resp.body);
if (lib.config().debug == true) console.log("[boostme] Got page. Decoding page...");
if (!$(".main #home").attr("data-url")) {
console.log(resp.data)
console.log(resp.body)
throw "Boostme.link bypass has changed or we have been rate limited. If you are the owner of this instance, please dump the terminal contents into an issue on the repo.";
} else {
return Buffer.from($(".main #home").attr("data-url"), "base64").toString("ascii");

@ -1,4 +1,4 @@
const axios = require("axios");
const got = require("got");
const cheerio = require("cheerio");
const lib = require("../lib");
@ -8,31 +8,32 @@ module.exports = {
get: async function(url, opt) {
if (lib.config().debug == true) console.log("[carrd] Requesting page...");
let h = lib.config().defaults?.axios.headers;
let h = lib.config().defaults?.got.headers;
if (opt.referer) {
h.Referer = opt.referer;
}
let proxy;
if (lib.config().defaults?.axios.proxy) {
if (lib.config().defaults?.axios.proxy?.type == "socks5") {
if (lib.config().defaults?.got.proxy) {
if (lib.config().defaults?.got.proxy?.type == "socks5") {
const agent = require("socks-proxy-agent");
let prox = `socks5://${lib.config().defaults?.axios.proxy?.host}:${lib.config().defaults?.axios.proxy?.port}`;
let prox = `socks5://${lib.config().defaults?.got.proxy?.host}:${lib.config().defaults?.got.proxy?.port}`;
proxy = {httpsAgent: (new agent.SocksProxyAgent(prox))};
} else {
proxy = {};
}
}
let resp = await axios({
let resp = await got({
method: "GET",
url: url,
headers: h,
...proxy
...proxy,
throwHttpErrors: false
});
if (lib.config().debug == true) console.log("[carrd] Got page, parsing...");
let $ = cheerio.load(resp.data);
let $ = cheerio.load(resp.body);
let links = [];
if (lib.config().debug == true) console.log("[carrd] Parsed. Filtering out unviewable links...");

@ -1,4 +1,4 @@
const axios = require("axios");
const got = require("got");
const cheerio = require("cheerio");
const scp = require("set-cookie-parser");
const lib = require("../lib");
@ -25,8 +25,8 @@ module.exports = {
if (opt.referer) header.Referer = opt.referer;
let proxy;
if (lib.config().defaults?.axios.proxy) {
if (lib.config().defaults?.axios.proxy?.type == "socks5") {
if (lib.config().defaults?.got.proxy) {
if (lib.config().defaults?.got.proxy?.type == "socks5") {
const agent = require("socks-proxy-agent");
try {
if ((new URL(prox).hostname == "localhost" || new URL(prox).hostname == "127.0.0.1") && new URL(proxy).port == "9050") {
@ -42,7 +42,7 @@ module.exports = {
}
}
let resp = await axios({
let resp = await got({
method: "GET",
url: url,
headers: header,
@ -50,7 +50,7 @@ module.exports = {
});
if (lib.config().debug == true) console.log("[cpmlink] Got page. Parsing page...");
let $ = cheerio.load(resp.data);
let $ = cheerio.load(resp.body);
let k = $("#skip [name=key]").val();
let t = $("#skip [name=time]").val();
let r = $("#skip [name=ref]").val();
@ -68,9 +68,9 @@ module.exports = {
let body = `key=${k}&time=${t}&ref=${r}&s_width=${w}&s_height=${h}&g-recaptcha-response=${cap}`;
if (lib.config().debug == true) console.log("[cpmlink] Requesting solve page...");
resp = await axios({
resp = await got({
method: "POST",
data: body,
body: body,
url: $("#skip").attr("action"),
headers: {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36",
@ -93,7 +93,7 @@ module.exports = {
...proxy
});
if (lib.config().debug == true) console.log("[cpmlink] Parsing solve page...");
$ = cheerio.load(resp.data);
$ = cheerio.load(resp.body);
return $("#continue a").attr("href");
} catch(err) {
throw err;

@ -1,4 +1,4 @@
const axios = require("axios");
const got = require("got");
const scp = require("set-cookie-parser");
const lib = require("../lib");
@ -21,8 +21,8 @@ module.exports = {
if (opt.referer) header.Referer = opt.referer;
let proxy;
if (lib.config().defaults?.axios.proxy) {
if (lib.config().defaults?.axios.proxy?.type == "socks5") {
if (lib.config().defaults?.got.proxy) {
if (lib.config().defaults?.got.proxy?.type == "socks5") {
const agent = require("socks-proxy-agent");
try {
if ((new URL(prox).hostname == "localhost" || new URL(prox).hostname == "127.0.0.1") && new URL(proxy).port == "9050") {
@ -38,7 +38,7 @@ module.exports = {
}
}
let resp = await axios({
let resp = await got({
method: "GET",
url: url,
headers: header,
@ -46,7 +46,7 @@ module.exports = {
});
if (lib.config().debug == true) console.log("[cshort] Getting next page URL (1/2)...");
let r = resp.data.split(`function redirect() {`)[1].split(`}`)[0].split(`\n`);
let r = resp.body.split(`function redirect() {`)[1].split(`}`)[0].split(`\n`);
let h;
let c = `${lib.cookieString(scp(resp.headers["set-cookie"]))}; aid=${encodeURIComponent(JSON.stringify([new URL(url).pathname.substring(1)]))}`;
@ -61,12 +61,11 @@ module.exports = {
await new Promise(resolve => setTimeout(resolve, 10000)); // can't bypass the wait, unfortunately
if (lib.config().debug == true) console.log("[cshort] Requesting next page URL...");
resp = await axios({
resp = await got({
method: "GET",
throwHttpErrors: false,
followRedirect: false,
url: `${url}?u=${h}`,
validateStatus: function() {
return true;
},
headers: {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
@ -86,8 +85,8 @@ module.exports = {
}
});
if (resp.request.socket._httpMessage._redirectable._currentUrl !== url) {
return resp.request.socket._httpMessage._redirectable._currentUrl;
if (resp?.headers?.location !== url) {
return resp.headers.location;
} else {
throw "Redirect didn't occur when it was supposed to.";
}

@ -1,4 +1,4 @@
const axios = require("axios");
const got = require("got");
const cheerio = require("cheerio");
const scp = require("set-cookie-parser");
const lib = require("../lib");
@ -9,21 +9,21 @@ module.exports = {
get: async function(url, opt) {
try {
if (lib.config().debug == true) console.log("[dlp] Requesting page...");
let header = lib.config().defaults?.axios.headers;
let header = lib.config().defaults?.got.headers;
if (opt.referer) header.Referer = opt.referer;
let proxy;
if (lib.config().defaults?.axios.proxy) {
if (lib.config().defaults?.axios.proxy?.type == "socks5") {
if (lib.config().defaults?.got.proxy) {
if (lib.config().defaults?.got.proxy?.type == "socks5") {
const agent = require("socks-proxy-agent");
let prox = `socks5://${lib.config().defaults?.axios.proxy?.host}:${lib.config().defaults?.axios.proxy?.port}`;
let prox = `socks5://${lib.config().defaults?.got.proxy?.host}:${lib.config().defaults?.got.proxy?.port}`;
proxy = {httpsAgent: (new agent.SocksProxyAgent(prox))};
} else {
proxy = {};
}
}
let resp = await axios({
let resp = await got({
method: "GET",
url: url,
headers: header,
@ -31,7 +31,7 @@ module.exports = {
});
if (lib.config().debug == true) console.log("[dlp] Got page. Parsing page...");
let $ = cheerio.load(resp.data);
let $ = cheerio.load(resp.body);
let pw = $("#wrapper > #content > p").text().includes("Password");
let b;
@ -54,15 +54,15 @@ module.exports = {
}
if (lib.config().debug == true) console.log("[dlp] Sending body data...");
resp = await axios({
resp = await got({
method: "POST",
url: url,
data: b,
body: b,
headers: header
});
if (lib.config().debug == true) console.log("[dlp] Sent body data. Parsing response...");
$ = cheerio.load(resp.data);
$ = cheerio.load(resp.body);
let links = [];
await ($("#wrapper > #content > center a").each(function(a) {
@ -102,7 +102,7 @@ async function fetchCaptcha(url, ref, h) {
h["Sec-Fetch-Site"] = "same-origin";
h["TE"] = "Trailers";
let resp = await axios({
let resp = await got({
responseType: "arraybuffer",
method: "GET",
headers: h,
@ -111,5 +111,5 @@ async function fetchCaptcha(url, ref, h) {
if (lib.config().debug == true) console.log(`[dlp] Got CAPTCHA, content type `, resp.headers["content-type"]);
return `data:${resp.headers["content-type"]};base64,${Buffer.from(resp.data).toString("base64")}`;
return `body:${resp.headers["content-type"]};base64,${Buffer.from(resp.body).toString("base64")}`;
}

@ -1,4 +1,4 @@
const axios = require("axios");
const got = require("got");
const cheerio = require("cheerio");
const lib = require("../lib");
@ -75,39 +75,36 @@ module.exports = {
}
if (lib.config().debug == true) console.log("[generic] Requesting page...");
let header = lib.config().defaults?.axios.headers;
let header = lib.config().defaults?.got.headers;
if (opt.referer) header.Referer = opt.referer;
let proxy;
if (lib.config().defaults?.axios.proxy) {
if (lib.config().defaults?.axios.proxy?.type == "socks5") {
if (lib.config().defaults?.got.proxy) {
if (lib.config().defaults?.got.proxy?.type == "socks5") {
const agent = require("socks-proxy-agent");
let prox = `socks5://${lib.config().defaults?.axios.proxy?.host}:${lib.config().defaults?.axios.proxy?.port}`;
let prox = `socks5://${lib.config().defaults?.got.proxy?.host}:${lib.config().defaults?.got.proxy?.port}`;
proxy = {httpsAgent: (new agent.SocksProxyAgent(prox))};
} else {
proxy = {};
}
}
let resp = await axios({
let resp = await got({
method: "GET",
url: url,
headers: header,
maxContentLength: 5000000,
maxBodyLength: 5000000,
validateStatus: function() {
return true;
},
throwHttpErrors: false,
followRedirect: false,
...proxy
});
// adf.ly detection
// i don't remember the origin of this script unfortunately so uh can't credit this
if (lib.config().debug == true) console.log("[generic] Got page. Checking for indicators that this is an adf.ly link...");
if (resp.data.includes(`var ysmm = `)) {
if (resp.body.includes(`var ysmm = `)) {
let a, m, I = "",
X = "",
r = resp.data.split(`var ysmm = `)[1].split('\'')[1];
r = resp.body.split(`var ysmm = `)[1].split('\'')[1];
for (m = 0; m < r.length; m++) {
if (m % 2 == 0) {
I += r.charAt(m);
@ -145,23 +142,23 @@ module.exports = {
// generic HTML redirect
if (lib.config().debug == true) console.log("[generic] Done. Checking for HTML redirects...");
if (resp.data.includes(`content="0;URL=`)) {
return resp.data.split(`content="0;URL=`)[1].split(`"`)[0];
if (resp.body.includes(`content="0;URL=`)) {
return resp.body.split(`content="0;URL=`)[1].split(`"`)[0];
}
// generic countdown sites
if (lib.config().debug == true) console.log("[generic] Done. Checking for general countdown sites...");
if (resp.data.split("$('.skip-btn').attr('href','").length > 1) {
return resp.data.split("$('.skip-btn').attr('href','")[1].split("')")[0];
if (resp.body.split("$('.skip-btn').attr('href','").length > 1) {
return resp.body.split("$('.skip-btn').attr('href','")[1].split("')")[0];
}
// generic HTTP redirects, put any non-specific (like adlinkfly-type extractors) sites below this
if (lib.config().debug == true) console.log("[generic] Done. Checking for HTTP redirects...");
if (resp.request.socket._httpMessage._redirectable._currentUrl !== url) {
if (lib.isUrl(resp.request.socket._httpMessage._redirectable._currentUrl)) {
return resp.request.socket._httpMessage._redirectable._currentUrl;
} else if (resp.request.socket._httpMessage._redirectable._currentUrl.startsWith("/")) {
return `${url.split("/").slice(0, 3)}${resp.request.socket._httpMessage._redirectable._currentUrl}`;
if (resp.headers?.location == undefined) {
if (lib.isUrl(resp.headers?.location)) {
return resp.headers?.location;
} else if (resp.headers?.location?.startsWith("/")) {
return `${url.split("/").slice(0, 3)}${resp.headers?.location}`;
}
}
@ -174,7 +171,7 @@ module.exports = {
}
}
let $ = cheerio.load(resp.data);
let $ = cheerio.load(resp.body);
// wpsafe-link protectors
if (lib.config().debug == true) console.log("[generic] Done. Checking for wpsafelink indicators...");

@ -1,4 +1,4 @@
const axios = require("axios");
const got = require("got");
const cheerio = require("cheerio");
const lib = require("../lib");
@ -7,12 +7,12 @@ module.exports = {
requiresCaptcha: false,
get: async function(url, opt) {
try {
let header = lib.config().defaults?.axios.headers;
let header = lib.config().defaults?.got.headers;
if (opt.referer) header.Referer = opt.referer;
let proxy;
if (lib.config().defaults?.axios.proxy) {
if (lib.config().defaults?.axios.proxy?.type == "socks5") {
if (lib.config().defaults?.got.proxy) {
if (lib.config().defaults?.got.proxy?.type == "socks5") {
const agent = require("socks-proxy-agent");
try {
if ((new URL(prox).hostname == "localhost" || new URL(prox).hostname == "127.0.0.1") && new URL(proxy).port == "9050") {
@ -29,7 +29,7 @@ module.exports = {
}
if (lib.config().debug == true) console.log("[ityim] Requesting page...");
let resp = await axios({
let resp = await got({
method: "GET",
url: url,
headers: header,
@ -37,7 +37,7 @@ module.exports = {
});
if (lib.config().debug == true) console.log("[ityim] Got page. Parsing page...");
let $ = cheerio.load(resp.data);
let $ = cheerio.load(resp.body);
return $(".col-xs-6.col-md-4.vertical_center:not(#logo_div) a").attr("href");
} catch(err) {

@ -1,4 +1,4 @@
const axios = require("axios");
const got = require("got");
const cheerio = require("cheerio");
const lib = require("../lib");
@ -7,14 +7,14 @@ module.exports = {
requiresCaptcha: false,
get: async function(url, opt) {
try {
let header = lib.config().defaults?.axios.headers;
let header = lib.config().defaults?.got.headers;
if (opt.referer) header.Referer = opt.referer;
let proxy;
if (lib.config().defaults?.axios.proxy) {
if (lib.config().defaults?.axios.proxy?.type == "socks5") {
if (lib.config().defaults?.got.proxy) {
if (lib.config().defaults?.got.proxy?.type == "socks5") {
const agent = require("socks-proxy-agent");
let prox = `socks5://${lib.config().defaults?.axios.proxy?.host}:${lib.config().defaults?.axios.proxy?.port}`;
let prox = `socks5://${lib.config().defaults?.got.proxy?.host}:${lib.config().defaults?.got.proxy?.port}`;
proxy = {httpsAgent: (new agent.SocksProxyAgent(prox))};
} else {
proxy = {};
@ -22,7 +22,7 @@ module.exports = {
}
if (lib.config().debug == true) console.log("[karung] Requesting page...");
let resp = await axios({
let resp = await got({
method: "GET",
url: url,
headers: header,
@ -31,7 +31,7 @@ module.exports = {
if (lib.config().debug == true) console.log("[karung] Got page. Parsing page...");
let $ = cheerio.load(resp.data);
let $ = cheerio.load(resp.body);
let r = $("#makingdifferenttimer")[0]?.attribs?.href;
if (lib.config().debug == true) console.log("[karung] Parsed. Decoding data...");
r = new URL(r);

@ -1,4 +1,4 @@
const axios = require("axios");
const got = require("got");
const lib = require("../lib");
module.exports = {
@ -7,23 +7,23 @@ module.exports = {
get: async function(url, opt) {
try {
if (lib.config().debug == true) console.log(`[linktree] Requesting page...`);
let h = lib.config().defaults?.axios.headers;
let h = lib.config().defaults?.got.headers;
if (opt.referer) {
h.Referer = opt.referer;
}
let proxy;
if (lib.config().defaults?.axios.proxy) {
if (lib.config().defaults?.axios.proxy?.type == "socks5") {
if (lib.config().defaults?.got.proxy) {
if (lib.config().defaults?.got.proxy?.type == "socks5") {
const agent = require("socks-proxy-agent");
let prox = `socks5://${lib.config().defaults?.axios.proxy?.host}:${lib.config().defaults?.axios.proxy?.port}`;
let prox = `socks5://${lib.config().defaults?.got.proxy?.host}:${lib.config().defaults?.got.proxy?.port}`;
proxy = {httpsAgent: (new agent.SocksProxyAgent(prox))};
} else {
proxy = {};
}
}
let resp = await axios({
let resp = await got({
method: "GET",
url: url,
headers: h,
@ -32,7 +32,7 @@ module.exports = {
if (lib.config().debug == true) console.log(`[linktree] Got page. Finding and parsing "__NEXT_DATA__"...`);
let l = [];
let j = resp.data.split(`<script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">`)[1]?.split(`</script>`)[0];
let j = resp.body.split(`<script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">`)[1]?.split(`</script>`)[0];
if (j == null) throw `Couldn't find "__NEXT_DATA__"`;
j = JSON.parse(j);
if (j == null) throw `Couldn't parse "__NEXT_DATA__"`;
@ -72,10 +72,10 @@ async function deAge(linkId, accountId, url) {
validationInput: { acceptedSensitiveContent: (parseInt(linkId) || linkId)}
});
let resp = await axios({
let resp = await got({
method: "POST",
url: "https://linktr.ee/api/profiles/validation/gates",
data: data,
body: data,
headers: {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36",
"Accept": "application/json, text/plain, */*",
@ -95,6 +95,6 @@ async function deAge(linkId, accountId, url) {
}
});
if (lib.config().debug == true) console.log(`[linktree] Parsed link id ${linkId} as "${resp.data.links[0].url}"`);
return resp.data.links[0].url;
if (lib.config().debug == true) console.log(`[linktree] Parsed link id ${linkId} as "${resp.body.links[0].url}"`);
return resp.body.links[0].url;
}

@ -1,4 +1,4 @@
const axios = require("axios");
const got = require("got");
const lib = require("../lib");
module.exports = {
@ -17,11 +17,11 @@ module.exports = {
requiresCaptcha: true,
get: async function(url, opt) {
try {
let header = lib.config().defaults?.axios.headers;
let header = lib.config().defaults?.got.headers;
let proxy;
if (lib.config().defaults?.axios.proxy) {
if (lib.config().defaults?.axios.proxy?.type == "socks5") {
if (lib.config().defaults?.got.proxy) {
if (lib.config().defaults?.got.proxy?.type == "socks5") {
const agent = require("socks-proxy-agent");
try {
if ((new URL(prox).hostname == "localhost" || new URL(prox).hostname == "127.0.0.1") && new URL(proxy).port == "9050") {
@ -60,23 +60,23 @@ module.exports = {
if (lib.config().debug == true) console.log("[linkvertise] Getting user token...");
let resp = await axios({
let resp = await got({
method: "GET",
headers: header,
url: `https://publisher.linkvertise.com/api/v1/redirect/link/static/${id}?origin=&resolution=1920x960`
});
let type;
if (resp.data?.data.link.target_type == "URL") {
if (resp.body?.data.link.target_type == "URL") {
type = "target";
} else if (resp.data?.data.link.target_type == "PASTE") {
} else if (resp.body?.data.link.target_type == "PASTE") {
type = "paste";
} else {
throw "Unknown target type.";
}
let rp = resp.data?.data.link.id;
let ut = resp.data?.user_token;
let rp = resp.body?.data.link.id;
let ut = resp.body?.user_token;
if (lib.config().debug == true) console.log("[linkvertise] Got user token:", ut);
let ck;
@ -96,14 +96,14 @@ module.exports = {
header["Content-Length"] = lib.byteCount(d);
if (lib.config().debug == true) console.log("[linkvertise] Sending CAPTCHA result to get CAPTCHA token...");
resp = await axios({
data: d,
resp = await got({
body: d,
method: "POST",
headers: header,
url: `https://publisher.linkvertise.com/api/v1/redirect/link/${id}/traffic-validation?X-Linkvertise-UT=${ut}`
});
ck = resp.data?.data.tokens.TARGET;
ck = resp.body?.data.tokens.TARGET;
if (lib.config().debug == true) console.log("[linkvertise] Got CAPTCHA token: ", ck);
let fb = {};
@ -121,14 +121,14 @@ module.exports = {
header["Content-Length"] = lib.byteCount(fb);
if (lib.config().debug == true) console.log("[linkvertise] Sending final request...");
resp = await axios({
data: fb,
resp = await got({
body: fb,
method: "POST",
headers: header,
url: `https://publisher.linkvertise.com/api/v1/redirect/link/${id}/${type}?X-Linkvertise-UT=${ut}`
});
return (resp.data?.data.paste || resp.data?.data.target);
return (resp.body?.data.paste || resp.body?.data.target);
} catch(err) {
if (err.code.toLowerCase().includes("econnreset") && opt.retried !== 1) {
if (lib.config().debug == true) console.log("[linkvertise] Retrying request in 30 seconds, as it recieved a connection reset error...");

@ -13,11 +13,14 @@ module.exports = {
let args = (lib.config().defaults?.puppeteer || {headless: true});
if (lib.config().debug == true) console.log("[longwp] Launching browser...");
b = await pup.launch(args);
let p = await b.newPage();
if (lib.config().debug == true) console.log("[longwp] Done, opening page...");
await p.goto(url, {waitUntil: "networkidle2"});
if (lib.config().debug == true) console.log("[longwp] Done, starting continous function...");
let u = await cont(p);
await b.close();
return u;
@ -30,6 +33,7 @@ module.exports = {
async function cont(p) {
try {
if ((await p.$("#wpsafelink-landing"))) {
if (lib.config().debug == true) console.log("[longwpsafe] Handling landing page...");
if (lib.config().debug == true) console.log("[longwpsafe] Found landing page, parsing...");
await p.evaluate(function() {
document.querySelector("#wpsafelink-landing").submit();
@ -45,7 +49,7 @@ async function cont(p) {
j = (j.safelink || j.second_safelink_url);
return j;
} else {
if (lib.config().debug == true) console.log("[longwpsafe] Nothing found, waiting...");
if (lib.config().debug == true) console.log("[longwp] Nothing found, waiting...");
await p.waitForNavigation();
return (await cont(p));
}

@ -1,4 +1,4 @@
const axios = require("axios");
const got = require("got");
const cheerio = require("cheerio");
const lib = require("../lib");
@ -8,30 +8,30 @@ module.exports = {
get: async function(url, opt) {
try {
if (lib.config().debug == true) console.log("[mboost] Requesting page...");
let h = lib.config().defaults?.axios.headers;
let h = lib.config().defaults?.got.headers;
if (opt.referer) {
h.Referer = opt.referer;
}
let proxy;
if (lib.config().defaults?.axios.proxy) {
if (lib.config().defaults?.axios.proxy?.type == "socks5") {
if (lib.config().defaults?.got.proxy) {
if (lib.config().defaults?.got.proxy?.type == "socks5") {
const agent = require("socks-proxy-agent");
let prox = `socks5://${lib.config().defaults?.axios.proxy?.host}:${lib.config().defaults?.axios.proxy?.port}`;
let prox = `socks5://${lib.config().defaults?.got.proxy?.host}:${lib.config().defaults?.got.proxy?.port}`;
proxy = {httpsAgent: (new agent.SocksProxyAgent(prox))};
} else {
proxy = {};
}
}
let resp = await axios({
let resp = await got({
method: "GET",
url: url,
headers: h,
...proxy
});
let $ = cheerio.load(resp.data);
let $ = cheerio.load(resp.body);
if (lib.config().debug == true) console.log("[mboost] Got page. Parsing page...");
if ($("#__NEXT_DATA__")) {

@ -1,4 +1,4 @@
const axios = require("axios");
const got = require("got");
const cheerio = require("cheerio");
const lib = require("../lib");
@ -7,16 +7,16 @@ module.exports = {
requiresCaptcha: false,
get: async function(url, opt) {
try {
let h = lib.config().defaults?.axios.headers;
let h = lib.config().defaults?.got.headers;
if (opt.referer) {
h.Referer = opt.referer;
}
let proxy;
if (lib.config().defaults?.axios.proxy) {
if (lib.config().defaults?.axios.proxy?.type == "socks5") {
if (lib.config().defaults?.got.proxy) {
if (lib.config().defaults?.got.proxy?.type == "socks5") {
const agent = require("socks-proxy-agent");
let prox = `socks5://${lib.config().defaults?.axios.proxy?.host}:${lib.config().defaults?.axios.proxy?.port}`;
let prox = `socks5://${lib.config().defaults?.got.proxy?.host}:${lib.config().defaults?.got.proxy?.port}`;
proxy = {httpsAgent: (new agent.SocksProxyAgent(prox))};
} else {
proxy = {};
@ -25,7 +25,7 @@ module.exports = {
if (lib.config().debug == true) console.log("[mshake] Requesting page...");
let resp = await axios({
let resp = await got({
method: "GET",
url: url,
headers: h,
@ -35,7 +35,7 @@ module.exports = {
if (lib.config().debug == true) console.log("[mshake] Got page, parsing page...");
let $ = cheerio.load(resp.data);
let $ = cheerio.load(resp.body);
$(".swiper > .swiper-wrapper > .swiper-slide a").each(function(i) {
let ele = $(".swiper > .swiper-wrapper > .swiper-slide a")[i];
let u = ele?.attribs.href;

@ -1,4 +1,4 @@
const axios = require("axios");
const got = require("got");
const cheerio = require("cheerio");
const lib = require("../lib");
@ -11,23 +11,23 @@ module.exports = {
if (!u.pathname.startsWith("/download") || !u.searchParams.get("key") || !u.searchParams.get("id")) throw "Invalid olamovies link.";
if (lib.config().debug == true) console.log("[ola] Requesting page...");
let h = lib.config().defaults?.axios.headers;
let h = lib.config().defaults?.got.headers;
if (opt.referer) {
h.Referer = opt.referer;
}
let proxy;
if (lib.config().defaults?.axios.proxy) {
if (lib.config().defaults?.axios.proxy?.type == "socks5") {
if (lib.config().defaults?.got.proxy) {
if (lib.config().defaults?.got.proxy?.type == "socks5") {
const agent = require("socks-proxy-agent");
let prox = `socks5://${lib.config().defaults?.axios.proxy?.host}:${lib.config().defaults?.axios.proxy?.port}`;
let prox = `socks5://${lib.config().defaults?.got.proxy?.host}:${lib.config().defaults?.got.proxy?.port}`;
proxy = {httpsAgent: (new agent.SocksProxyAgent(prox))};
} else {
proxy = {};
}
}
let resp = await axios({
let resp = await got({
method: "GET",
url: url,
headers: h,
@ -35,7 +35,7 @@ module.exports = {
});
if (lib.config().debug == true) console.log("[ola] Got page, parsing page...");
let $ = cheerio.load(resp.data);
let $ = cheerio.load(resp.body);
let d = $("#download > a").attr("href");
if (d == "" || d == undefined) throw "Could not find destination in page."

@ -1,4 +1,4 @@
const axios = require("axios");
const got = require("got");
const cheerio = require("cheerio");
const scp = require("set-cookie-parser");
const lib = require("../lib");
@ -9,21 +9,21 @@ module.exports = {
get: async function(url, opt) {
try {