diff --git a/package.json b/package.json index a93664b..0e437bf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scrape-websitee", - "version": "1.0.66", + "version": "1.0.67", "description": "Website Scraping", "main": "index.js", "scripts": { diff --git a/src/downloader.js b/src/downloader.js index 54de59b..976accc 100644 --- a/src/downloader.js +++ b/src/downloader.js @@ -353,8 +353,11 @@ async function spotify(url) { async function igStory(username) { try { - const { pkId } = await igStalk(username) - const { data } = await axios.get(`https://instasupersave.com/api/ig/stories/${pkId}`) + const { data } = await axios.get(`https://igram.world/api/ig/story?url=https://instagram.com/stories/${username}`, { + headers: { + "User-Agent": "PostmanRuntime/7.37.0" + } + }) let result = { status: true, media: [] } data.result.map((check) => { if (check.has_audio === true) { diff --git a/src/search.js b/src/search.js index 3bae64c..b11339a 100644 --- a/src/search.js +++ b/src/search.js @@ -241,7 +241,11 @@ async function lyrics(query) { async function igStalk(username) { try { - const { data, status } = await axios.get(`${baseSSS}api/ig/userInfoByUsername/${username}`) + const { data, status } = await axios.get(`https://igram.world/api/ig/userInfoByUsername/${username}`, { + headers: { + "User-Agent": "PostmanRuntime/7.37.0" + } + }) if (data.result.user.pronouns.length === 0) { var pronoun = "" } else { @@ -269,12 +273,13 @@ async function igStalk(username) { } return result } catch (err) { - return (result = { + result = { status: false, creator: "Thoriq Azzikra", message: "Tidak dapat menemukan akun" - }) + } console.log(result) + return result } }