random en 9gag
This commit is contained in:
parent
0a6f071154
commit
0264ac2935
@ -233,6 +233,7 @@ end
|
||||
function get_infiniGAG()
|
||||
b, c, h = http.request("http://infinigag-us.aws.af.cm")
|
||||
local gag = json:decode(b)
|
||||
math.randomseed(os.time())
|
||||
i = math.random(#gag.data) -- random max json table size (# is an operator o.O)
|
||||
local link_image = gag.data[i].images.normal
|
||||
print("9gag image"..link_image)
|
||||
|
Reference in New Issue
Block a user