this.remarks=Arrays.asList("The URL should be a direct link to an image.","You can also upload an image as an attachment while calling this command instead of using a url.",
" * Specify the `-d` parameter to do a depth search!"," * It is useful for cropped images and edited images, but makes the search much longer.");
}
@Override
publicCommandResultexecute(TextChannelchannel,Userauthor,Messagemsg,String[]args){//allow people to not input url to check sauce of the most recent image like u/2dgt3d?
if(yandex.select(".cbir-other-sizes__list").size()>0){//TODO merge the sort algorithms?
/*other = yandex.select(".cbir-other-sizes__list").first().select("a").stream().sorted((a, b) -> { //selects largest possible section of the other sizes
String[] aA = a.select(".cbir-other-sizes__resolution").first().text().split("×"), bA = b.select(".cbir-other-sizes__resolution").first().text().split("×");
//gets second image coz usually the first one is just a sharper identical image, then get the largest image that has the image inside or select an image closest to 16:9 for anime checking //closest to given ratio now, anime checking usually cant be done with depth search anyways since not every scene is screen capped online
try{//search iqdb first for the tags; results usually more organized and formatted
Elementiqdb=Jsoup.connect("https://iqdb.org/?url="+url+"&service[]=1&service[]=2&service[]=3&service[]=4&service[]=5&service[]=11&service[]=13").get().body();//services excluding eshuushuu since it has no tags and will fallback to saucenao anyways
String[]title=result.selectFirst(".resulttitle")==null?newString[]{"No title"}:result.selectFirst(".resulttitle").wholeText().replaceAll("\\\\n","\n").split("\n",2);//there can be no titles, like 4chan sources