2010-08-01から1ヶ月間の記事一覧

mechanize:Mechanize::Page::Link#uri

以下のような HTML で <html> <head> <title>link test</title> </head> <body> <a href="http://foo.org/" target="_blank">foo</a> <a href="http://bar.org/">bar</a> </body> </html>>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb74f02d8 ... >> page = agent.get('http://127.0.0.1:8080/test…</mechanize:0xb74f02d8>

mechanize:Mechanize::Page::Link#page

以下のような HTML で <html> <head> <title>link test</title> </head> <body> <a href="http://foo.org/" target="_blank">foo</a> <a href="http://bar.org/">bar</a> </body> </html>>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb7440360 ... >> page = agent.get('http://127.0.0.1:8080/test…</mechanize:0xb7440360>

mechanize:Mechanize::Page::Link#attributes

以下のような HTML で <html> <head> <title>link test</title> </head> <body> <a href="http://foo.org/" target="_blank">foo</a> <a href="http://bar.org/">bar</a> </body> </html>>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb7481360 ... >> page = agent.get('http://127.0.0.1:8080/test…</mechanize:0xb7481360>

mechanize:Mechanize::Page::Link#text

以下のような HTML で <html> <head> <title>link test</title> </head> <body> <a href="http://foo.org/" target="_blank">foo</a> <a href="http://bar.org/">bar</a> </body> </html>>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb74962d8 ... >> page = agent.get('http://127.0.0.1:8080/test…</mechanize:0xb74962d8>

mechanize:Mechanize::Page::Link#href

以下のような HTML で <html> <head> <title>link test</title> </head> <body> <a href="http://foo.org/" target="_blank">foo</a> <a href="http://bar.org/">bar</a> </body> </html>>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb74c432c ... >> page = agent.get('http://127.0.0.1:8080/test…</mechanize:0xb74c432c>

mechanize:Mechanize::Page::Link#node

以下のような HTML で <html> <head> <title>link test</title> </head> <body> <a href="http://foo.org/" target="_blank">foo</a> <a href="http://bar.org/">bar</a> </body> </html>>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb742f380 ... >> page = agent.get('http://127.0.0.1:8080/test…</mechanize:0xb742f380>

mechanize:Mechanize::Page#title

>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb744232c ... >> page = agent.get('http://www.google.com/') => #<Mechanize::Page {url #<URI::HTTP:0xb74356b8 URL:http://www.google.co.jp/>} ... >> page.title => "Google"</mechanize::page></mechanize:0xb744232c>

mechanize:Mechanize::Page#parser, #root

以下のような HTML で <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-style-type" content="text/css"> <meta http-equiv="content-script-type" content="text/javascript"> <title>meta test</title> </head> <body> </body> </html>>> require 'mechanize' =>…

mechanize:Mechanize::Page#meta

以下のような HTML で <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-style-type" content="text/css"> <meta http-equiv="content-script-type" content="text/javascript"> <title>meta test</title> </head> <body> </body> </html>>> require 'mechanize' =>…

mechanize:Mechanize::Page#links_with

以下のような HTML で <html> <head> <title>link test</title> </head> <body> <a href="http://foo.org/" target="_blank">foo</a> <a href="http://bar.org/">bar</a> </body> </html>>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb748b360 ... >> page = agent.get('http://127.0.0.1:8080/test…</mechanize:0xb748b360>

mechanize:Mechanize::Page#links

以下のような HTML で <html> <head> <title>link test</title> </head> <body> <a href="http://foo.org/" target="_blank">foo</a> <a href="http://bar.org/">bar</a> </body> </html>>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb7420380 ... >> page = agent.get('http://127.0.0.1:8080/test…</mechanize:0xb7420380>

mechanize:Mechanize::Page#link_with

以下のような HTML で <html> <head> <title>link test</title> </head> <body> <a href="http://foo.org/" target="_blank">foo</a> <a href="http://bar.org/">bar</a> </body> </html>>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb74f02d8 ... >> page = agent.get('http://127.0.0.1:8080/test…</mechanize:0xb74f02d8>

mechanize:Mechanize::Page#labels_hash

以下のような HTML で <html> <head> <title>label test</title> </head> <body> <form method="post" action="cgi/test_form00.cgi" name="form1"> <input type="radio" name="radio1" id="r1" value="male" checked="checked"><label for="r1">Male</label> <input type="radio" name="radio1" id="r2" value="female"></form></body></html>

mechanize:Mechanize::Page#labels

以下のような HTML で <html> <head> <title>label test</title> </head> <body> <form method="post" action="cgi/test_form00.cgi" name="form1"> <input type="radio" name="radio1" id="r1" value="male" checked="checked"><label for="r1">Male</label> <input type="radio" name="radio1" id="r2" value="female"></form></body></html>

mechanize:Mechanize::Page#images

以下のような HTML で <html> <head> <title>image test</title> </head> <body> <img src="img1.png" width="256" height="128" alt="foo"> <img src="img2.png" width="200" height="100" alt="bar"> </body> </html>>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb74a82e4 ... >> page = agent.ge…</mechanize:0xb74a82e4>

mechanize:Mechanize::Page#image_urls

以下のような HTML で <html> <head> <title>image test</title> </head> <body> <img src="img1.png" width="256" height="128" alt="foo"> <img src="img2.png" width="200" height="100" alt="bar"> </body> </html>>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb74e232c ... >> page = agent.ge…</mechanize:0xb74e232c>

mechanize:Mechanize::Page#iframes_with

以下のような HTML で <html> <head> <title>iframe test</title> </head> <body> <iframe src="iframe1.html" name="i1" width="200" height="100">foo</iframe> <iframe src="iframe2.html" name="i2" width="400" height="300">bar</iframe> </body> </html>>> require 'mechanize' => true >> agent = Mechanize.new => #

mechanize:Mechanize::Page#iframes

以下のような HTML で <html> <head> <title>iframe test</title> </head> <body> <iframe src="iframe1.html" name="i1" width="200" height="100">foo</iframe> <iframe src="iframe2.html" name="i2" width="400" height="300">bar</iframe> </body> </html>>> require 'mechanize' => true >> agent = Mechanize.new => #

mechanize:Mechanize::Page#iframe_with

以下のような HTML で <html> <head> <title>iframe test</title> </head> <body> <iframe src="iframe1.html" name="i1" width="200" height="100">foo</iframe> <iframe src="iframe2.html" name="i2" width="400" height="300">bar</iframe> </body> </html>>> require 'mechanize' => true >> agent = Mechanize.new => #

mechanize:Mechanize::Page#frames_with

以下のような HTML で <html> <head> <title>frame test</title> </head> <body> <frameset rows="30%,*"> <frame src="frame1.html"> <frame src="frame2.html"> </frameset> </body> </html>>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb744a360 ... >> page = agent.get('http://127.0.0.1:8080…</mechanize:0xb744a360>

mechanize:Mechanize::Page#frames

以下のような HTML で <html> <head> <title>frame test</title> </head> <body> <frameset rows="30%,*"> <frame src="frame1.html"> <frame src="frame2.html"> </frameset> </body> </html>>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb74c2360 ... >> page = agent.get('http://127.0.0.1:8080…</mechanize:0xb74c2360>

mechanize:Mechanize::Page#frame_with

以下のような HTML で <html> <head> <title>frame test</title> </head> <body> <frameset rows="30%,*"> <frame src="frame1.html"> <frame src="frame2.html"> </frameset> </body> </html>>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb7477360 ... >> page = agent.get('http://127.0.0.1:8080…</mechanize:0xb7477360>

mechanize:Mechanize::Page#forms_with

以下のような HTML で <html> <head> <title>form test</title> </head> <body> <form method="post" action="cgi/foo00.cgi" name="form1"> </form> <form method="post" action="cgi/foo01.cgi" name="form2"> </form> </body> </html>>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb74782d8 ... >…</mechanize:0xb74782d8>

mechanize:Mechanize::Page#forms

以下のような HTML で <html> <head> <title>form test</title> </head> <body> <form method="post" action="cgi/foo00.cgi" name="form1"> </form> <form method="post" action="cgi/foo01.cgi" name="form2"> </form> </body> </html>>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb748f2e4 ... >…</mechanize:0xb748f2e4>

mechanize:Mechanize::Page#form_with

以下のような HTML で <html> <head> <title>form test</title> </head> <body> <form method="post" action="cgi/foo00.cgi" name="form1"> </form> <form method="post" action="cgi/foo01.cgi" name="form2"> </form> </body> </html>>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb7443380 ... >…</mechanize:0xb7443380>

mechanize:Mechanize::Page#encoding=

>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb74dc328 ... >> page = agent.get('http://google.com/') => #<Mechanize::Page {url #<URI::HTTP:0xb74cbeec URL:http://www.google.co.jp/>} {meta} ... >> page.encoding => "Shift_JIS" >> page.encoding = "EUC-JP" => "EUC-JP" >> page.e…</mechanize::page></mechanize:0xb74dc328>

mechanize:Mechanize::Page#encoding

>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb742a2e0 ... >> page = agent.get('http://google.com/') => #<Mechanize::Page {url #<URI::HTTP:0xb7419ea4 URL:http://www.google.co.jp/>} {meta} ... >> page.encoding => "Shift_JIS"</mechanize::page></mechanize:0xb742a2e0>

mechanize:Mechanize::Page#content_type

>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb74a22e0 ... >> page = agent.get('http://google.com/') => #<Mechanize::Page {url #<URI::HTTP:0xb7491ea4 URL:http://www.google.co.jp/>} {meta} ... >> page.content_type => "text/html; charset=Shift_JIS"</mechanize::page></mechanize:0xb74a22e0>

mechanize:Mechanize::Page#bases_with

以下のような HTML で <html> <head> <title>base test</title> <base href="http://127.0.0.1:8080/test00_base.html"> </head> <body> </body> </html>>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb74e1328 ... >> page = agent.get('http://127.0.0.1:8080/test00_base.html') => #</mechanize:0xb74e1328>

mechanize:Mechanize::Page#bases

以下のような HTML で <html> <head> <title>base test</title> <base href="http://127.0.0.1:8080/test00_base.html"> </head> <body> </body> </html>>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb74d7328 ... >> page = agent.get('http://127.0.0.1:8080/test00_base.html') => #</mechanize:0xb74d7328>