[問題] scrubyt使用問題 on WindowsXP

看板Ruby作者 (丁丁是個人材)時間16年前 (2008/04/28 23:26), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
環境: JRuby 1.1 狀況: [新手上路] 小弟想去截取網頁中的資訊,在爬文後 大多數人是使用scrubyt,它還支援POST功能 看了官方的教學安裝完後,卻出現錯誤訊息 不知是否在WinXP不相容的問題呢?還是需要對text_filter.rb來做修改? C:/jruby-1.1/lib/ruby/gems/1.8/gems/scrubyt-0.3.4-java/lib/scrubyt/core/scraping /filters/text_filter.rb:25 warning: don't put space before argument parentheses Exception in thread "main" java.lang.NoSuchMethodError: org.jruby.runtime.builti n.IRubyObject.getInstanceVariable(Ljava/lang/String;)Lorg/jruby/runtime/builtin/ IRubyObject; Source Code如下 require 'rubygems' require 'scrubyt' google_data = Scrubyt::Extractor.define do #Perform the action(s) fetch 'http://www.google.com/ncr' fill_textfield 'q', 'ruby' submit #Construct the wrapper link "Ruby Programming Language" do url "href", :type => :attribute end next_page "Next", :limit => 2 end puts google_data.to_xml 附錄: 官方網站http://scrubyt.org/ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.116.35.78
文章代碼(AID): #185Uotpv (Ruby)