summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlstwitch.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lstwitch.rb b/lstwitch.rb
index be71fc0..cf8af46 100755
--- a/lstwitch.rb
+++ b/lstwitch.rb
@@ -27,10 +27,10 @@ end
while offset < total
- response = JSON.parse(http.request(Net::HTTP::Get.new("/kraken/streams/?offset=#{offset}#{game}")).body)
+ response = JSON.parse(http.request(Net::HTTP::Get.new("/kraken/streams/?limit=100&offset=#{offset}#{game}")).body)
total = response["_total"]
for stream in response['streams']
- printf( "%-45s %-36s %6i %6i %-.#{width-46-37-7-7}s\n", stream['channel']['url'].to_s, stream['channel']['game'].to_s, stream['viewers'], stream['channel']['followers'], stream['channel']['status'].to_s.gsub(/\n/,'') )
+ printf( "%-45s %-36s %6i %6i %-.#{width-46-37-7-7}s\n", stream['channel']['url'].to_s.sub(/http:\/\/.+?\./,''), stream['channel']['game'].to_s, stream['viewers'].to_i, stream['channel']['followers'].to_i, stream['channel']['status'].to_s.gsub(/\n/,'') )
end
offset += 100