Ayogiakbar

SHORTLINK

Oct 2nd, 2025 (edited)
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Shortening Url - OneUrl
  3.  * Author : gienetic
  4.  * Base   : https://play.google.com/store/apps/details?id=de.lemke.oneurl
  5.  * Note : Repost/Recode? Tag Author & Sumber lah
  6.  */
  7.  
  8. const axios = require("axios");
  9. const ua = "Gienetic/1.2.0 (Android 13; Pixel 7 Pro) Mobile";
  10.  
  11.  
  12. // da.gd
  13. async function daGD(url, customName) {
  14.     const endpoint = `https://da.gd/shorten?url=${encodeURIComponent(url)}&shorturl=${encodeURIComponent(customName)}`;
  15.     const res = await axios.get(endpoint, {
  16.         headers: { "User-Agent": ua, "Accept-Encoding": "gzip" }
  17.     });
  18.     return res.data.trim();
  19. }
  20.  
  21. // v.gd
  22. async function vGD(url, customName) {
  23.     const endpoint = `https://v.gd/create.php?format=json&url=${encodeURIComponent(url)}&shorturl=${encodeURIComponent(customName)}&logstats=1`;
  24.     const res = await axios.get(endpoint, {
  25.         headers: { "User-Agent": ua, "Accept-Encoding": "gzip" }
  26.     });
  27.     return res.data.shorturl;
  28. }
  29.  
  30. // tinu.be
  31. async function tinuBe(url, customName) {
  32.     const payload = JSON.stringify([{ longUrl: url, urlCode: customName }]);
  33.     const res = await axios.post("https://tinu.be/en", payload, {
  34.         headers: {
  35.             "User-Agent": ua,
  36.             "Accept-Encoding": "gzip",
  37.             "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
  38.             "next-action": "74b2f223fe2b6e65737e07eeabae72c67abf76b2"
  39.         }
  40.     });
  41.     const code = res.data?.data?.urlCode || customName;
  42.     return `https://tinu.be/${code}`;
  43. }
  44.  
  45. // tinyurl.com (fix GET)
  46. async function tinyUrl(url, customName) {
  47.     const endpoint = `https://tinyurl.com/api-create.php?url=${encodeURIComponent(url)}&alias=${encodeURIComponent(customName)}`;
  48.     const res = await axios.get(endpoint, {
  49.         headers: {
  50.             "User-Agent": ua,
  51.             "Accept-Encoding": "gzip"
  52.         }
  53.     });
  54.     return res.data.trim();
  55. }
  56.  
  57. // spoo.me normal
  58. async function spooMe(url, customName) {
  59.     const endpoint = `https://spoo.me/?alias=${encodeURIComponent(customName)}&url=${encodeURIComponent(url)}`;
  60.     const res = await axios.post(endpoint, null, {
  61.         headers: {
  62.             "User-Agent": ua,
  63.             "Accept-Encoding": "gzip",
  64.             "Content-Type": "application/x-www-form-urlencoded",
  65.             "Accept": "application/json"
  66.         }
  67.     });
  68.     return res.data.short_url;
  69. }
  70.  
  71. // spoo.me emoji
  72. async function spooEmoji(url, emojis) {
  73.     const endpoint = `https://spoo.me/emoji?emojies=${encodeURIComponent(emojis)}&url=${encodeURIComponent(url)}`;
  74.     const res = await axios.post(endpoint, null, {
  75.         headers: {
  76.             "User-Agent": ua,
  77.             "Accept-Encoding": "gzip",
  78.             "Content-Type": "application/x-www-form-urlencoded",
  79.             "Accept": "application/json"
  80.         }
  81.     });
  82.     return res.data.short_url;
  83. }
  84.  
  85. module.exports = { daGD, vGD, tinuBe, tinyUrl, spooMe, spooEmoji };
  86.  
  87. //Example
  88. //await tinuBe("https://whatsapp.com/channel/0029Vb5EZCjIiRotHCI1213L", "IniSumberNya")
  89.  
Advertisement
Add Comment
Please, Sign In to add comment