package kemonoapi_test

import (
	"context"
	"fmt"
	"testing"

	"git.kmsign.ru/royalcat/tstor/plugins/kemono/kemonoapi"
)

func TestScrapCreator(t *testing.T) {
	k := kemonoapi.NewClient("https://coomer.su/")
	ctx := context.Background()
	posts := k.FetchPosts(ctx, "onlyfans", "bigtittygothegg")

	for post, err := range posts {
		if err != nil {
			t.Fatal(err)
		}

		if post.ID == "" {
			t.Fatal(fmt.Errorf("post id is empty"))
		}
	}
}