Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let axios = require('axios')
- let cheerio = require('cheerio')
- function quotenime() {
- return new Promise(async(resolve) => {
- try {
- let html = await (await axios.get('https://jalantikus.com/hiburan/kata-kata-anime/')).data
- let $ = cheerio.load(html)
- let data = []
- $('div.li-wrapper').each((i,e) => $(e).text().startsWith('"') ? data.push($(e).text()) : '')
- return resolve({ creator: '@neoxrs – Wildan Izzudin', status: true, data })
- } catch (e) {
- console.log(e)
- return resolve({ creator: '@neoxrs – Wildan Izzudin', status: false })
- }})
- }
- function ultah() {
- return new Promise(async(resolve) => {
- try {
- let html = await (await axios.get('https://jalantikus.com/quotes/ucapan-ulang-tahun-untuk-sahabat/')).data
- let $ = cheerio.load(html)
- let data = []
- $('code').each((i,e) => data.push(/Terjemahan/.test($(e).text()) ? $(e).text().split('Terjemahan:')[1].trim() : $(e).text()))
- return resolve({ creator: '@neoxrs – Wildan Izzudin', status: true, data })
- } catch (e) {
- console.log(e)
- return resolve({ creator: '@neoxrs – Wildan Izzudin', status: false })
- }})
- }
- function tebakan() {
- return new Promise(async(resolve) => {
- try {
- let html = await (await axios.get('https://jalantikus.com/quotes/tebak-tebakan-lucu-terbaru/')).data
- let $ = cheerio.load(html)
- let data = [], answer = []
- let ans = html.split('Jawaban:')
- for (let i=0; i<ans.length; i++) if (i != '95') answer.push(ans[i].split('</p>')[0].replace(/<\/strong>|<em>|<\/em>/g, '').trim())
- $('div.li-wrapper').each((i,e) => !$(e).text().startsWith('\r') ? data.push({ soal: $(e).text(), jawaban: answer[i - 9] }) : '')
- return resolve({ creator: '@neoxrs – Wildan Izzudin', status: true, data })
- } catch (e) {
- console.log(e)
- return resolve({ creator: '@neoxrs – Wildan Izzudin', status: false })
- }})
- }
- function gombal() {
- return new Promise(async(resolve) => {
- try {
- let html = await (await axios.get('https://jalantikus.com/quotes/gombalan-bikin-baper/')).data
- let $ = cheerio.load(html)
- let data = []
- $('div.li-wrapper').each((i,e) => $(e).text().startsWith('"') && !/(Cowok|Cewek):/.test($(e).text()) ? data.push($(e).text()) : '')
- return resolve({ creator: '@neoxrs – Wildan Izzudin', status: true, data })
- } catch (e) {
- console.log(e)
- return resolve({ creator: '@neoxrs – Wildan Izzudin', status: false })
- }})
- }
- function motivasi() {
- return new Promise(async(resolve) => {
- try {
- let html = await (await axios.get('https://jalantikus.com/quotes/kata-motivasi-hidup/')).data
- let $ = cheerio.load(html)
- let data = []
- $('div.li-wrapper').each((i,e) => $(e).text().startsWith('"') ? data.push($(e).text()) : '')
- return resolve({ creator: '@neoxrs – Wildan Izzudin', status: true, data })
- } catch (e) {
- console.log(e)
- return resolve({ creator: '@neoxrs – Wildan Izzudin', status: false })
- }})
- }
- function gokil() {
- return new Promise(async(resolve) => {
- try {
- let html = await (await axios.get('https://jalantikus.com/tips/kata-kata-lucu/')).data
- let $ = cheerio.load(html)
- let data = []
- $('div.li-wrapper').each((i,e) => !$(e).text().startsWith('\r') ? data.push($(e).text()) : '')
- return resolve({ creator: '@neoxrs – Wildan Izzudin', status: true, data })
- } catch (e) {
- console.log(e)
- return resolve({ creator: '@neoxrs – Wildan Izzudin', status: false })
- }})
- }
- function captionIg() {
- return new Promise(async(resolve) => {
- try {
- let html = await (await axios.get('https://jalantikus.com/tips/caption-instagram-kekinian/')).data
- let $ = cheerio.load(html)
- let data = []
- $('div.li-wrapper').each((i,e) => !$(e).text().startsWith('\r') ? data.push($(e).text()) : '')
- return resolve({ creator: '@neoxrs – Wildan Izzudin', status: true, data })
- } catch (e) {
- console.log(e)
- return resolve({ creator: '@neoxrs – Wildan Izzudin', status: false })
- }})
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement