When scraping multiple posts in a row, any post that is scraped after a post with paged comments had a malformed base_url, containing multiple "&after=" parameters. Because of this, apparently only the last page of comments was scraped for all subsequent posts.
Resetting the "after" variable at the start of the loop fixes this. In the for-loop for subcomments this was already implemented correctly.
When scraping multiple posts in a row, any post that is scraped after a post with paged comments had a malformed base_url, containing multiple "&after=" parameters. Because of this, apparently only the last page of comments was scraped for all subsequent posts. Resetting the "after" variable at the start of the loop fixes this. In the for-loop for subcomments this was already implemented correctly.