| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- import axios from 'axios';
- import cheerio from 'cheerio';
- //import {search, download} from 'aptoide-scraper';
- const handler = async (m, {conn, usedPrefix, command, text}) => {
- const apkpureApi = 'https://apkpure.com/api/v2/search?q=';
- const apkpureDownloadApi = 'https://apkpure.com/api/v2/download?id=';
- if (!text) throw `โ ๏ธ *๐๐จ๐๐ง๐๐๐ ๐๐ก ๐ฃ๐ค๐ข๐๐ง๐ ๐๐๐ก ๐ผ๐๐*`
- m.react("โ")
- try {
- const res = await fetch(`https://api.dorratz.com/v2/apk-dl?text=${text}`);
- const data = await res.json();
- const response = `โช๏ผค๏ผฅ๏ผณ๏ผฃ๏ผก๏ผฒ๏ผง๏ผก๏ผค๏ผฏ ๏ผก๏ผฐ๏ผซ๏ผณ๐โซ
- โโโโโโโโโโโโโโโโโโโโโโโโข
- โ๐ซ ๐๐๐๐ฝ๐๐: ${data.name}
- โ๐ฆ ๐๐ผ๐พ๐๐ผ๐๐: ${data.package}
- โ๐ ๐๐๐๐๐๐ผ ๐ผ๐พ๐๐๐๐๐๐ผ๐พ๐๐๐: ${data.lastUpdate}
- โ๐ช ๐๐๐๐: ${data.size}
- โโโโโโโโโโโโโโโโโโโโโโโโโข
- > *โณ แดฑหขแตแตสณแต แตโฟ แตแตแตแตโฟแตแต หขแตหข แตแตแต หขแต แตหขแตแต แตโฟแตแถฆแตโฟแตแต...*`;
- await conn.sendFile(m.chat, data.icon, 'error.jpg', response, m, null, fake);
- const apkSize = data.size.toLowerCase();
- if (apkSize.includes('gb') || (apkSize.includes('mb') && parseFloat(apkSize) > 999)) {
- return await m.reply('*๐๐ก ๐๐ฅ๐ ๐๐จ ๐ข๐ช๐ฎ ๐ฅ๐๐จ๐๐๐ค.*');
- }
- await conn.sendMessage(m.chat, {document: { url: data.dllink }, mimetype: 'application/vnd.android.package-archive', fileName: `${data.name}.apk`, caption: null }, { quoted: m });
- await m.react("โ
");
- } catch {
- try {
- const res = await fetch(`${apis}/download/apk?query=${text}`);
- const data = await res.json();
- const apkData = data.data;
- const response = `โช๏ผค๏ผฅ๏ผณ๏ผฃ๏ผก๏ผฒ๏ผง๏ผก๏ผค๏ผฏ ๏ผก๏ผฐ๏ผซ๏ผณ๐โซ
- โโโโโโโโโโโโโโโโโโโโโโโโข
- โ๐ซ ๐๐๐๐ฝ๐๐: ${apkData.name}
- โ๐ค ๐ฟ๐๐๐ผ๐๐๐๐๐๐: ${apkData.developer}
- โ๐ ๐๐๐๐๐๐ผ ๐ผ๐พ๐๐๐๐๐๐ผ๐พ๐๐๐: ${apkData.publish}
- โ๐ช ๐๐๐๐: ${apkData.size}
- โโโโโโโโโโโโโโโโโโโโโโโโโข
- > *โณ แดฑหขแตแตสณแต แตโฟ แตแตแตแตโฟแตแต หขแตหข แตแตแต หขแต แตหขแตแต แตโฟแตแถฆแตโฟแตแต...*`
- await conn.sendFile(m.chat, apkData.image, 'error,jpg', response, m, null, fake);
- if (apkData.size.includes('GB') || parseFloat(apkData.size.replace(' MB', '')) > 999) {
- return await m.reply('*๐๐ก ๐๐ฅ๐ ๐๐จ ๐ข๐ช๐ฎ ๐ฅ๐๐จ๐๐๐ค.*')
- }
- await conn.sendMessage(m.chat, {document: { url: apkData.download }, mimetype: 'application/vnd.android.package-archive', fileName: `${apkData.name}.apk`, caption: null }, { quoted: m });
- await m.react("โ
")
- } catch {
- try {
- const searchA = await search(text);
- const data5 = await download(searchA[0].id);
- let response = `โช๏ผค๏ผฅ๏ผณ๏ผฃ๏ผก๏ผฒ๏ผง๏ผก๏ผค๏ผฏ ๏ผก๏ผฐ๏ผซ๏ผณ๐โซ
- โโโโโโโโโโโโโโโโโโโโโโโโข
- โ๐ซ ๐๐๐๐ฝ๐๐: ${data5.name}
- โ๐ฆ ๐๐ผ๐พ๐๐ผ๐๐: ${data5.package}
- โ๐ ๐๐๐๐๐๐ผ ๐ผ๐พ๐๐๐๐๐๐ผ๐พ๐๐๐: ${data5.lastup}
- โ๐ช ๐๐๐๐: ${data5.size}
- โโโโโโโโโโโโโโโโโโโโโโโโโข
- > *โณ แดฑหขแตแตสณแต แตโฟ แตแตแตแตโฟแตแต หขแตหข แตแตแต หขแต แตหขแตแต แตโฟแตแถฆแตโฟแตแต...*`
- await conn.sendFile(m.chat, data5.icon, 'akp.jpg', response, m, false, fake)
- //conn.sendMessage(m.chat, {image: {url: data5.icon}, caption: response}, {quoted: m});
- if (data5.size.includes('GB') || data5.size.replace(' MB', '') > 999) {
- return await m.reply('*๐๐ก ๐๐ฅ๐ ๐๐จ ๐ข๐ช๐ฎ ๐ฅ๐๐จ๐๐๐ค.*')}
- await conn.sendMessage(m.chat, {document: {url: data5.dllink}, mimetype: 'application/vnd.android.package-archive', fileName: data5.name + '.apk', caption: null}, {quoted: m});
- m.react("โ
")
- } catch (e) {
- m.react(`โ`)
- console.log(e)
- handler.limit = false
- }}}}
- handler.help = ['apk', 'apkmod'];
- handler.tags = ['downloader'];
- handler.command = /^(apkmod|apk|modapk|dapk2|aptoide|aptoidedl)$/i;
- handler.register = true
- handler.limit = 2
- export default handler;
- async function searchApk(text) {
- const response = await axios.get(`${apkpureApi}${encodeURIComponent(text)}`);
- const data = response.data;
- return data.results;
- }
- async function downloadApk(id) {
- const response = await axios.get(`${apkpureDownloadApi}${id}`);
- const data = response.data;
- return data;
- }
|