Closed ghost closed 6 years ago
@DeathPhase It will fail because the page doesn't exists / have any results. You can do something like
let length = 0;
try {
length = (await Pornsearch.gifs()).length;
} catch (e) {
//
}
And then do whatever you want with the length (you don't need to use async / await for this, .then and .catch should work fine xd)
Umm this isn't really like a suggestion that you might be looking for, but like it would be cool if we can check how much pages and number of results each search returns. Like im using it to make it pull out a random webm each search, but if it hits a page number that exceeds the page number, or it hits a number that exceeds the number of search results, it errors lol.