This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const axios = require('axios'); | |
| async function tiktokSearch(query = 'dance tiktok') { | |
| try { | |
| const { data } = await axios({ | |
| method: 'POST', | |
| url: 'https://tikwm.com/api/feed/search', | |
| headers: { | |
| 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', | |
| 'User-Agent': 'Mozilla/5.0 (Linux; Android 10)', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const axios = require('axios'); | |
| const cheerio = require('cheerio'); | |
| async function scrapeMcpedlSearch(query = 'shaders', max = 10) { | |
| try { | |
| const { data } = await axios.get( | |
| `https://mcpedl.org/?s=${encodeURIComponent(query)}`, | |
| { | |
| timeout: 30000, | |
| headers: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const axios = require("axios") | |
| async function getJadwal(city = "Jakarta") { | |
| try { | |
| const { data } = await axios.get( | |
| `https://api.aladhan.com/v1/timingsByCity?city=${encodeURIComponent(city)}&country=Indonesia&method=2`, | |
| { timeout: 10000 } | |
| ) | |
| const t = data.data.timings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { createCanvas, GlobalFonts } = require("@napi-rs/canvas") | |
| const axios = require("axios") | |
| const fs = require("fs") | |
| const path = require("path") | |
| const os = require("os") | |
| const font_url = | |
| "https://raw.githubusercontent.com/saurusrawr/penting/main/font/ARIALN.ttf" | |
| const font_cache = path.join(os.tmpdir(), "arialn.ttf") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const axios = require("axios") | |
| const crypto = require("crypto") | |
| const BASE = "https://www.perplexity.ai" | |
| const header_dasar = { | |
| "User-Agent": | |
| "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36", | |
| Accept: "text/event-stream", | |
| "Accept-Language": "id-ID,id;q=0.9,en-US;q=0.8,en;q=0.7", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const axios = require("axios") | |
| async function getCoordinates(city) { | |
| try { | |
| const { data } = await axios.get( | |
| "https://nominatim.openstreetmap.org/search", | |
| { | |
| params: { | |
| q: city, | |
| format: "json", |