Does anyo开发者_如何学Gone know of a way to get fill_textfield to accept a big5-encoded string in the query_field? I keep getting an "unterminated string meets end of file" error with this:
require 'rubygems'
require 'scrubyt'
search_data = Scrubyt::Extractor.define do
fetch 'http://www.google.com/ncr'
fill_textfield 'q', '你好世界'
submit
end
Solved: The 2-byte big5 character was messing with the " ' " closing the string. Add a space after the Chinese and it works.
精彩评论