Höhere randomnes
This commit is contained in:
parent
a1afe7b4f2
commit
5a27f2e281
@ -4,7 +4,7 @@
|
||||
do
|
||||
|
||||
local function get_r34_info(tag)
|
||||
local limit = 50 -- number of posts to return (higher = more choices for random, but longer load times, hard limit of 100 posts)
|
||||
local limit = 100 -- number of posts to return (higher = more choices for random, but longer load times, hard limit of 100 posts)
|
||||
local BASE_URL = 'https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20xml%20where%20url%3D%27http%3A%2F%2Frule34.xxx%2Findex.php%3Fpage%3Ddapi%26s%3Dpost%26q%3Dindex%26limit%3D'..limit..'%26tags%3D'
|
||||
local END_URL = '%27&format=json'
|
||||
local url = BASE_URL..tag..END_URL
|
||||
@ -16,7 +16,6 @@ local function get_r34_info(tag)
|
||||
math.randomseed(os.time())
|
||||
-- random max json table size
|
||||
local i = math.random(#r34)
|
||||
|
||||
local url = r34[i].file_url
|
||||
local source_url = 'Source: http://rule34.xxx/index.php?page=post&s=view&id='..r34[i].id
|
||||
return url, source_url
|
||||
|
Reference in New Issue
Block a user