Regex Magic!
Yooh degenerate user kun, last week i looked onto other bot and then he have feature imagebomb
?
Interested, smh this is never unthinkable before, the route is simple but this is really fun lol
We fetch some random 5images, from various booru..
need no other modules or anything else
PHP/curl will do it all! and its less than 5min !
request/curl to https://gelbooru.com/index.php?page=dapi&s=post&q=index and do below:
$scrpe = '/<?xml(.*?)<\/posts>/s';
if ( preg_match($scrpe, $page, $list) )
if(preg_match_all('#file_url="(.*?)"#', $page, $match)) {
shuffle($match[1]);
echo '{"url":"',implode('\n',array_slice($match[1], 0, 5)),'"}';
}
- Some feature added (
hentaibomb
,realbomb
,gifbomb
,r34bomb
)
you can run$!hentaibomb <args>
and get 5random images, maybe we should increase the amount? lemme know