Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Sleeping consistently.

  • Loading branch information...
commit e754fc5af7d5327098d52bedb46500e3703d014c 1 parent fd4e559
@jqr jqr authored
Showing with 5 additions and 7 deletions.
  1. +5 −7 runkeeper.rb
View
12 runkeeper.rb
@@ -172,18 +172,16 @@ def find_and_parse_cached_activity_page
def open_url_and_cache_activity_page
puts " Downloading the activity on #{path}"
+ # Be a good Net citizen and wait 1 second so we don't pound
+ # their web site repeatedly
+ sleep 1
+
raw_html = open(url).read
# Cache the raw HTML
self.class.cache_file(cache_file_name, raw_html)
- doc = Nokogiri::HTML(raw_html)
-
- # Be a good Net citizen and wait 1 second so we don't pound
- # their web site repeatedly
- sleep 1
-
- doc
+ Nokogiri::HTML(raw_html)
end
# Get the url for a single user's activities
Please sign in to comment.
Something went wrong with that request. Please try again.