Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Enter URL to download from")
- url = read()
- tape = peripheral.wrap("top")
- tape.seek(-tape.getPosition())
- req, err = http.get(url, nil, true)
- bytes = req.readAll()
- for i = 1, #bytes do
- if i % 100000 == 0 then
- os.queueEvent("dl_yield")
- os.pullEvent("dl_yield")
- end
- tape.write(string.byte(string.sub(bytes, i, i+1)))
- end
Add Comment
Please, Sign In to add comment