Created
December 19, 2008 00:21
-
-
Save drnic/37731 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "hpricot" | |
Shoes.app do | |
# Just a simple app, yes? | |
@title = title "..." | |
download "https://github.com/?login=drnic&token=mytoken", | |
# download "https://github.com", :body => { "login" => 'drnic', "token" => '6c131adb79448cb80d166b448c446fb2' }, :method => "GET", | |
:start => proc { |dl| para "starting..." }, | |
:finish => proc { |dl| | |
doc = Hpricot(dl.response.body) | |
para doc.search("title").inner_html | |
para doc.search("li a").map { |a| a.inner_text }.join(", ") | |
para "finished" | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment