Skip to content

Commit

Permalink
Jdnwn
Browse files Browse the repository at this point in the history
  • Loading branch information
inirey authored Nov 19, 2021
1 parent 534af07 commit b1f2a0c
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions lib/utils/fbdl.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ async function fbDownloader(Link) {
"cache-control": "max-age=0",
"content-type": "application/x-www-form-urlencoded",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"cookie": "PHPSESSID=do1vgsj030f5vng7vjfu8efphv; _ga=GA1.2.2019332664.1630077537; _gid=GA1.2.1464712032.1630077537; _gat_gtag_UA_179310520_1=1; __cf_bm=3cd9d4e05a80a607f3bc7a141df7eff86e224935-1630077537-1800-AV9jiXVnI52McdWdoaeYmcYnpnwM1AyY4+gnCk5HP+uj8HJbcd0Ieys9NlE7Md9TwfVAWsANKf5s0ZcFZHl+WecR5UNfYqBcCdoqxAY6v23c457NKaoHSNByd5jtAMO8tg==; __gads=ID=6859ed445b2b7e88-2214f2911ecb00cc:T=1630077537:RT=1630077537:S=ALNI_MYD3y7YHQK-GbhSAspaSnEzdUp7rA"
"cookie": "_ga=GA1.2.1695343126.1621491858; _gid=GA1.2.28178724.1621491859; __gads=ID=8f9d3ef930e9a07b-2258e672bec80081:T=1621491859:RT=1621491859:S=ALNI_MbqLxhztDiYZttJFX2SkvYei6uGOw; __atuvc=3%7C20; __atuvs=60a6eb107a17dd75000; __atssc=google%3B2; _gat_gtag_UA_142480840_1=1"
},
referrerPolicy: "strict-origin-when-cross-origin"
referrerPolicy: "strict-origin-when-cross-origin",
}).then(async res => {
const $ = cheerio.load(res.data)
let url = $('#DOWNLOAD').find('a').attr('href');
let url = $('#downloadBox').find('a').attr('href');
await axios(Link, {
method: "GET",
data: null,
Expand All @@ -30,21 +30,25 @@ async function fbDownloader(Link) {
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"cache-control": "max-age=0",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"cookie": "PHPSESSID=do1vgsj030f5vng7vjfu8efphv; _ga=GA1.2.2019332664.1630077537; _gid=GA1.2.1464712032.1630077537; _gat_gtag_UA_179310520_1=1; __cf_bm=3cd9d4e05a80a607f3bc7a141df7eff86e224935-1630077537-1800-AV9jiXVnI52McdWdoaeYmcYnpnwM1AyY4+gnCk5HP+uj8HJbcd0Ieys9NlE7Md9TwfVAWsANKf5s0ZcFZHl+WecR5UNfYqBcCdoqxAY6v23c457NKaoHSNByd5jtAMO8tg==; __gads=ID=6859ed445b2b7e88-2214f2911ecb00cc:T=1630077537:RT=1630077537:S=ALNI_MYD3y7YHQK-GbhSAspaSnEzdUp7rA"
},
"cookie": "ig_did=08A3C465-7D43-4D8A-806A-88F98384E63B; ig_nrcb=1; mid=X_ipMwALAAFgQ7AftbrkhIDIdXJ8; fbm_124024574287414=base_domain=.facebook.com; shbid=17905; ds_user_id=14221286336; csrftoken=fXHAj5U3mcJihQEyVXfyCzcg46lHx7QD; sessionid=14221286336%3A5n4czHpQ0GRzlq%3A28; shbts=1621491639.7673564; rur=FTW"
},
referrerPolicy: "strict-origin-when-cross-origin"
}).then(res => {
const ch = cheerio.load(res.data)
const result = {
status: res.status,
result: {
Hd: ch('#results-list > div:nth-child(2)').find('div.download > a').attr('href'),
Normal: ch('#results-list > div:nth-child(3)').find('div.download > a').attr('href')
}
}).then(respon => {
const ch = cheerio.load(respon.data)
let HD = ch('HD').text().trim()
let Normal = ch('Normal').text().trim()
let Audio = ch('Audio').text().trim()
const result = {
status: true,
result: {
link_hd: HD,
audio: Audio,
normal: Normal
}
resolve(result)
}).catch(reject)
}).catch(reject)
}
hasil.push(result)
})
})
return hasil[0]
}
module.exports = { fbDownloader }

0 comments on commit b1f2a0c

Please sign in to comment.