Forum: Ruby on Rails grep page source

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Joe B. (Guest)
on 2006-03-07 02:49
hi all,  any one know how to grep page source by rails?
i.e.
i wanna grep html source  from http://www.ruby-forum.com/ by ruby code.


regards
Carmen -. (Guest)
on 2006-03-07 02:55
Joe B. wrote:
> hi all,  any one know how to grep page source by rails?
> i.e.
> i wanna grep html source  from http://www.ruby-forum.com/ by ruby code.

one way would be to grab the page serverside:

http://ruby-doc.org/stdlib/libdoc/net/http/rdoc/index.html

as for the grepping, there are a variety of regular expression options,
as well as dealing with the DOM tree of the fetched page at a higher
level. i guess you could also do similar things clientside, with
greasemonkey or similar utils

if you are serious about doing a lot of webpage 'remixing' you could
hceck out mousehole, which is some kind of ruby web proxy
Joe B. (Guest)
on 2006-03-07 03:09
thanks carmen


carmen  wrote:
> Joe B. wrote:
>> hi all,  any one know how to grep page source by rails?
>> i.e.
>> i wanna grep html source  from http://www.ruby-forum.com/ by ruby code.
>
> one way would be to grab the page serverside:
>
> http://ruby-doc.org/stdlib/libdoc/net/http/rdoc/index.html
>
> as for the grepping, there are a variety of regular expression options,
> as well as dealing with the DOM tree of the fetched page at a higher
> level. i guess you could also do similar things clientside, with
> greasemonkey or similar utils
>
> if you are serious about doing a lot of webpage 'remixing' you could
> hceck out mousehole, which is some kind of ruby web proxy
This topic is locked and can not be replied to.