Advertisement
fantadada

test

Aug 6th, 2015
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.95 KB | None | 0 0
  1. local mon = peripheral.wrap("right") -- Sélectionez le coté de votre écran :3
  2. term.redirect(mon)
  3. os.loadAPI("json")
  4. term.clear()
  5. term.setTextColor(colors.gray)
  6. print("Twitter GET v2.1")
  7. term.setCursorPos(3,1)
  8.      
  9. while true do
  10.   local contenu = http.get("https://www.youtube.com/channel/UCcquaLPekZycbThjjihO2Kg")
  11.   --Ici changer Bl4ckWare par le pseudo a surveiller.
  12.   local data = contenu.readAll()
  13.   decode = json.decode(data)
  14.   i = 10
  15.   ii = 0
  16.     while ii <= 10 do
  17.       if decode.statuses[i] ~= null then
  18.         term.setTextColor(colors.white)
  19.              local text = decode.statuses[i].text
  20.              text = text:gsub("u00e9","e")
  21.              text = text:gsub("u00e0","a")
  22.              text = text:gsub("u00a0"," ")
  23.         print("\n "..text)
  24.         term.setTextColor(colors.orange)
  25.         print(" from : " ..decode.statuses[i].user.name)
  26.       end
  27.     i = i - 1
  28.     ii = ii + 1
  29.     sleep(0.1)
  30.     end
  31.     sleep(60)
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement