Skip to content

The Thread method isn't returning the fully parsed comment tree. #90

@krishamoud

Description

@krishamoud

Maybe I'm doing something wrong but after going through the documentation and trying to figure out what's happening I'm not sure what I'm doing wrong.

The simplest reproduction of it is this.

package main

import (
	"fmt"

	"github.com/turnage/graw/reddit"
)

func main() {
	if bot, err := reddit.NewBotFromAgentFile("some-app.agent", 0); err != nil {
		fmt.Println("Failed to create bot handle: ", err)
	} else {
		thread, err := bot.Thread("/r/golang/comments/bv0azt/using_graw_a_reddit_api_wrapper_for_go_like_praw/")
		if err != nil {
			fmt.Println(err)
		}
		for _, comment := range thread.Replies {
			fmt.Println(comment.Body)
		}
	}
}

Which outputs

⇒  go run main.go
Did this get resolved? I'm having the same problem.

And it should have three comments unless I'm misunderstanding something.

link to the reddit thread in question

Thanks in advance! I feel like I'm missing something silly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions