instagram: replace filter with find for story media filtering

This commit is contained in:
wukko 2024-04-17 00:00:29 +06:00
parent 70fdc2939a
commit 55a93629a6
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -162,7 +162,7 @@ async function getStory(username, id) {
media = data?.data?.xdt_api__v1__feed__reels_media?.reels_media?.find(m => m.id === userId);
} catch {}
const item = media.items.filter(m => m.pk === id)[0];
const item = media.items.find(m => m.pk === id);
if (!item) return { error: 'ErrorEmptyDownload' };
if (item.video_versions) {