Hi, I've got a little problem here, when I try to get all comments, it seems I just got a half of total comments on the post when I loop data from .get_comments(). Is it my code problem? or have you any idea why this can be happen?(Image below)

There is a hypothesis why .get_comments() method does not load all comments. I made it by looking at such cases manually.
It returns only the basic _(directly below the publication)_ comments. Comments written in response to basic ones are not included. Check it out
Duplicate of https://github.com/instaloader/instaloader/issues/460#, https://github.com/instaloader/instaloader/issues/590#
There is a hypothesis why
.get_comments()method does not load all comments. I made it by looking at such cases manually.It returns only the basic _(directly below the publication)_ comments. Comments written in response to basic ones are not included. Check it out
Duplicate of #460, #590
Hi @shepurev Thanks for your answer
In your given example get_comments() does in fact load all comments. Comments written in response to basic ones are included and can be accessed through the answers field which is nested inside each comment.
import instaloader
L = instaloader.Instaloader()
post = instaloader.Post.from_shortcode(L.context, 'CBAQLopB6d3')
comments_from_loop_including_answers = []
for comment in post.get_comments():
comments_from_loop_including_answers.append(comment)
for answer in comment.answers:
comments_from_loop_including_answers.append(answer)
print(len(comments_from_loop_including_answers)) # output: 8
print(post.comments) # output: 8
Most helpful comment
There is a hypothesis why
.get_comments()method does not load all comments. I made it by looking at such cases manually.It returns only the basic _(directly below the publication)_ comments. Comments written in response to basic ones are not included. Check it out
Duplicate of https://github.com/instaloader/instaloader/issues/460#, https://github.com/instaloader/instaloader/issues/590#