You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/utils/shared_utils.rb:42:in traverse_for_match': undefined methodeach' for nil:NilClass (NoMethodError)
from /opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/utils/shared_utils.rb:42:in call' from /opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/utils/shared_utils.rb:42:intraverse_for_match'
from /opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/utils/shared_utils.rb:42:in each' from /opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/utils/shared_utils.rb:42:intraverse_for_match'
from /opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/utils/shared_utils.rb:44:in call' from /opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/utils/shared_utils.rb:44:intraverse_for_match'
from /opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/utils/simple_example_lookup.rb:36:in find_node_from_text' from /opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/scraping/filters/tree_filter.rb:67:ingenerate_XPath_for_example'
... 7 levels...
from /opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/shared/extractor.rb:75:in initialize' from /opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/shared/extractor.rb:32:innew'
from /opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/shared/extractor.rb:32:in `define'
from my-scraper.rb:11
The text was updated successfully, but these errors were encountered:
require 'rubygems'
require 'scrubyt'
Scrubyt::Extractor.define do
fetch "http://john.wordpress.com"
site_information '//*' do
is_feed "//feed"
end
end.to_hash.first
I suddenly got this problem with scripts that had been working before. Solved it by deinstalling a newer version of hpricot I had gotten thus reversing to version 0.6.164.
This http://www.hindoogle.com/blog/index.php?s=rails&sbutt=Go didn't work, but looking into the file I got the idea with hpricot. Also check your installed mechanize versions if you're having problems with scrubyt. Seems to mes they stopped development of it in 2008 and you're stuck with using the old versions of the other libraries now :/
Here is the fix: http://www.hindoogle.com/blog/2009/09/scrubyt-traverse_for_match-nilclass/
Here is the error:
/opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/utils/shared_utils.rb:42:in
traverse_for_match': undefined method
each' for nil:NilClass (NoMethodError)from /opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/utils/shared_utils.rb:42:in
call' from /opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/utils/shared_utils.rb:42:in
traverse_for_match'from /opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/utils/shared_utils.rb:42:in
each' from /opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/utils/shared_utils.rb:42:in
traverse_for_match'from /opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/utils/shared_utils.rb:44:in
call' from /opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/utils/shared_utils.rb:44:in
traverse_for_match'from /opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/utils/simple_example_lookup.rb:36:in
find_node_from_text' from /opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/scraping/filters/tree_filter.rb:67:in
generate_XPath_for_example'... 7 levels...
from /opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/shared/extractor.rb:75:in
initialize' from /opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/shared/extractor.rb:32:in
new'from /opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/shared/extractor.rb:32:in `define'
from my-scraper.rb:11
The text was updated successfully, but these errors were encountered: