new api shorten url
This commit is contained in:
parent
498200d706
commit
ed996371b0
@ -301,10 +301,11 @@ class WebEmbed {
|
|||||||
// Credit: https://www.npmjs.com/package/node-url-shortener + google :))
|
// Credit: https://www.npmjs.com/package/node-url-shortener + google :))
|
||||||
const getShorten = async (url) => {
|
const getShorten = async (url) => {
|
||||||
const APIurl = [
|
const APIurl = [
|
||||||
// 'https://is.gd/create.php?format=simple&url=', :(
|
// 'https://is.gd/create.php?format=simple&url=', :(
|
||||||
'https://tinyurl.com/api-create.php?url=',
|
'https://tinyurl.com/api-create.php?url=',
|
||||||
// 'https://cdpt.in/shorten?url=', Redirects 5s :(
|
'https://sagiri-fansub.tk/api/v1/short?url=', // my api, pls don't ddos :(
|
||||||
];
|
// 'https://cdpt.in/shorten?url=', Redirects 5s :(
|
||||||
|
];
|
||||||
try {
|
try {
|
||||||
const res = await axios.get(
|
const res = await axios.get(
|
||||||
`${APIurl[Math.floor(Math.random() * APIurl.length)]}${url}`,
|
`${APIurl[Math.floor(Math.random() * APIurl.length)]}${url}`,
|
||||||
|
Loading…
Reference in New Issue
Block a user