Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mon = peripheral.wrap("top") -- Sélectionez le coté de votre écran :3
- term.redirect(mon)
- os.loadAPI("json")
- term.clear()
- term.setTextColor(colors.gray)
- print("Twitter GET v2.1")
- term.setCursorPos(3,1)
- while true do
- local contenu = http.get("http://goofyplace.org/Black/twitter/request.php?user=Markus Persson")
- --Ici changer Bl4ckWare par le pseudo a surveiller.
- local data = contenu.readAll()
- decode = json.decode(data)
- i = 10
- while i <= 10 do
- if decode.statuses[i] ~= null then
- term.setTextColor(colors.white)
- local text = decode.statuses[i].text
- text = text:gsub("u00e9","e")
- text = text:gsub("u00e0","a")
- text = text:gsub("u00a0"," ")
- print("\n "..text)
- term.setTextColor(colors.orange)
- print(" from : " ..decode.statuses[i].user.name)
- end
- i = i - 1
- sleep(0.1)
- end
- sleep(60)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement