Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I want to fetch an album #1802

Open
fzkhan19 opened this issue Oct 15, 2024 · 0 comments
Open

I want to fetch an album #1802

fzkhan19 opened this issue Oct 15, 2024 · 0 comments
Labels
bug unconfirmed This issue hasn't been read/confirmed/accepted by an admin

Comments

@fzkhan19
Copy link

fzkhan19 commented Oct 15, 2024

I want to fetch an album from instagram, the post consists of 2 pictures. But the issue with that is it only fetches the first one image twice.
Here is the code snippet:

			const posts = await feed.items();

			for (const post of posts) {
				const postData = {
					type:
						post.media_type === 1
							? "photo"
							: post.media_type === 2
								? "video"
								: "album",
					likes: post.like_count,
					comments: post.comment_count,
					links: post.image_versions2?.candidates.map((img) => img.url) || [],
					caption: post.caption?.text || "",
				};

				console.log("POSTS:::: ",post.image_versions2);
@fzkhan19 fzkhan19 added bug unconfirmed This issue hasn't been read/confirmed/accepted by an admin labels Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unconfirmed This issue hasn't been read/confirmed/accepted by an admin
Projects
None yet
Development

No branches or pull requests

1 participant