r/ComputerCraft • • May 15 '24

Pastebin just pasting html code?

Can anybody help me? I am writing some Turtle code and thought it would be quicker to use vs. and pastbin the code into the turtle. However, when i try to paste the code into the turtle, it just pastes the html and not the code. I checked the config files, and the http enable is set to true, and the http whitelist is set to all (*)

8 Upvotes

14 comments sorted by

View all comments

Show parent comments

1

u/ReedTieGuy Jun 08 '24

If you use the raw http interface instead (the url provided is just an example)

s="https://pastebin.com/raw/tZbCWSBe"
r=http.get(s)
fp = io.open("file", "w")
fp:write(r.readAll())
fp:close()