# Selecting text in scrubyt

**URL:** <https://www.ruby-forum.com/t/selecting-text-in-scrubyt/152199>\
**Category:** Ruby\
**Created:** [October 31, 2008, 7:47am UTC](https://www.ruby-forum.com/t/selecting-text-in-scrubyt/152199 "2008-10-31T07:47:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinayhk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ce73a5/32.png) [@vinayhk](https://www.ruby-forum.com/u/vinayhk)\
**Post date:** [October 31, 2008, 7:47am UTC](https://www.ruby-forum.com/t/selecting-text-in-scrubyt/152199/1 "2008-10-31T07:47:53Z")

</div>

hi,

i am using scrubyt, and below is my code to scap

google.

Scrubyt.logger = Scrubyt::Logger.new  
google\_data = Scrubyt::Extractor.define do  
#Perform the action(s)  
fetch ‘[http://www.google.com/](http://www.google.com/)’  
fill\_textfield ‘q’, ‘ruby’  
submit  
#Construct the wrapper

# 

link “//div[3]/div/ol/li” do

head “/h3[@class=‘r’]”  
des “/div[@class=‘s’]”

end  
next\_page “Next”, :limit =\> 2  
end

and this wil output some thing like this

# Ruby P.ming Language

# A dynamic, interpreted, open source programming language with a focus

on simplicity and productivity. Site includes news, downloads,  
documentation, …www.ruby-lang.org/ - 12k - Cached - Similar  
pagesDownloadsDocumentationin Twenty MinutesWhat’s RubyDownload  
RubyLibrariesAbout RubySecurityMore results from [ruby-lang.org](http://ruby-lang.org) Â»

# Ruby (programming language) - Wikipedia, the free encyclopedia

# Ruby is a dynamic, reflective, general purpose object-oriented

programming language that combines syntax inspired by Perl with  
Smalltalk-like features.  
…en.wikipedia.org/wiki/Ruby\_(programming\_language) - 118k - Cached -  
Similar pages

since

 has text and some child nodes. I m getting all  
text of 
 as well as its chlid nodes.

how to filter this( i dont want child node’s text). Can any body help in  
this. What procedure i have to follow.
