Update index.js
Browse files308 unmodified lines3093103113123123133133143153153163173183196 unmodified lines326327328329328330331330332333334335308 unmodified lines let regex = /https?:\/\/(www\.|v(t|m|vt)\.|t\.)?tiktok\.com/; if (!regex.test(url)) return res.json({ message: 'Invalid URL' }); let data = await fetch(`https://tikwm.com/api/?url=` + url) data = await data.json() console.log(data.json()) if (!data.json()) return res.json({ message: 'API TO API KOID:v' }); console.log(data) if (!data) return res.json({ message: 'API TO API KOID:v' }); return res.json({ result: data?.json() result: await data }) } catch (e) { console.log(e);6 unmodified lines let regex = /https:\/\/pin\.it\/\w+|https:\/\/[a-z]{2}\.pinterest\.com\/pin\/\d+/; if (!regex.test(url)) return res.json({ message: 'Invalid URL' }); let data = await fetch(`https://pinterestdownloader.io/id/frontendService/DownloaderService?url=` + url) data = await data.json() if (!data.json()) return res.json({ message: 'API TO API KOID:v' }); if (!data) return res.json({ message: 'API TO API KOID:v' }); return res.json({ result: data.json() result: data }) } catch (e) { console.log(e);index.js+7-5