Permalink
Browse files

Sleep between http requests to keep a low profile.

  • Loading branch information...
1 parent 0a14a6a commit 60a7d2227912d18a3d987ec69ae166dc8a3ac9d8 CosmicCat committed Jun 13, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 solace-sounds-ripper.rb
View
@@ -39,6 +39,10 @@ def main
dirs_to_search.each do |dir|
puts "Searching #{HOST}#{dir}"
+
+ # don't overwhelm the server
+ sleep 1
+
subdir = Nokogiri::HTML(open(HOST + dir))
streams_to_grab = subdir.css('a').map{|x|x[:href]}.grep(%r{\.mp3})
streams_to_rip.concat(streams_to_grab)

0 comments on commit 60a7d22

Please sign in to comment.