speedtest-cli aktualisiert

This commit is contained in:
2016-12-16 19:00:42 +01:00
parent cddb7e03ab
commit d7279386c2
2 changed files with 4 additions and 9 deletions

View File

@ -1,8 +1,3 @@
--[[Requires speedtest-cli (https://github.com/sivel/speedtest-cli)
$ wget -O speedtest-cli https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
$ chmod +x speedtest-cli
$ sudo mv speedtest-cli /usr/local/bin/speedtest-cli
]]
local speedtest_cli = {}
function speedtest_cli:init(config)
@ -11,7 +6,7 @@ end
function speedtest_cli:action(msg, config)
utilities.send_typing(msg.chat.id, 'typing')
local result = run_command('speedtest-cli --share')
local result = run_command('speedtest --share')
local url = result:match("Share results: (.*)")
print('URL: '..url)
local text = 'http://www.speedtest.net/my-result/'..url:match('http://www.speedtest.net/result/(.*).png')