Skip to content

Instantly share code, notes, and snippets.

@moro
Created March 13, 2009 09:08
Show Gist options
  • Save moro/78499 to your computer and use it in GitHub Desktop.
Save moro/78499 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# vim:set fileencoding=utf-8 filetype=ruby
$KCODE = 'u'
require 'rubygems'
require 'nokogiri'
p (Nokogiri::HTML(<<-HTML) / "input[type=password][name='kondo[shuuhei]']").attr("value")
<html><head></head><body>
<form action="hoge">
<input type="password" name="kondo[shuuhei]" value="近藤修平" />
</form>
</body></html>
HTML
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment