开发者

Scrubyt: Using big5 strings in query_field for fill_textfield

开发者 https://www.devze.com 2022-12-31 11:54 出处:网络
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:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号