Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/local/bin lua
- -- usage:
- -- lua screepHighscores.lua savedHtmlOfScreepHighscoresPage.html
- local f = assert(io.open(arg[1], "r"))
- local s = f:read("all")
- f:close()
- local board = assert(io.open("/home/kalvis/screepScores.log", "a+"))
- for name, score in string.gmatch(s,".-\"#!/profile/(%w+).-binding\">(.-)<") do
- board:write(os.date("%y-%m-%d %H:%M"), "\t", score, "\t", name, "\n")
- print(os.date("%y-%m-%d %H:%M"), score, name)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement