Kodehawa / imageboard-api

Simple asynchronous Java API wrapper around the most popular danbooru-compatible (Konachan, Yande.re, Danbooru, Gelbooru, etc) booru APIs.
Apache License 2.0
53 stars 10 forks source link

"Random images" isnt really random #116

Closed DeadShinigami closed 12 months ago

DeadShinigami commented 1 year ago

Ive noticed that when grabbing images from danbooru, whether that be by using an asynchronous call or through creating ImageBoard object, the images it generates arent randomizing everytime. When printing out the image, its always the same image. If a span of time passes, however, there is a chance that this image changes from what it was. When printing out this new image however, it simply keeps printing out this same, new image. Is there a way to randomize the images everytime?

Kodehawa commented 1 year ago

The phrasing is incorrect on my side. They're not "randomized", I meant random as in just whatever the site returns.

You'd need to fetch 50 (or however many you want) images from whichever (or random) page you want and pick a random one yourself.