Get Source Code of a http://... site?

J

Joshua Muheim

Hi all

I want to download the source code of a website using Ruby? How can I
achieve this? ...when searching with Google, I only get download links
for the Ruby source etc. ;-)

Thanks
Josh
 
R

Robert Klemme

2009/4/20 Joshua Muheim said:
I want to download the source code of a website using Ruby? How can I
achieve this? ...when searching with Google, I only get download links
for the Ruby source etc. ;-)

The source code of a web site is usually not available apart from the
JavaScript you see in pages - for good reasons (security,
copyright...).

Cheers

robert
 
J

Joshua Muheim

Robert said:
The source code of a web site is usually not available apart from the
JavaScript you see in pages - for good reasons (security,
copyright...).

Cheers

robert

Oh, I wasn't clear enough, I just need the XHTML code, no
behind-the-scenes Ruby or PHP or stuff. ;-)

It's because I want to use captchator.com and I need to check the result
(0 or 1) using an URL like this:

http://captchator.com/captcha/check_answer/#{captcha_code}/#{@comment.captcha}
 
R

Robert Klemme

2009/4/20 Joshua Muheim said:
Oh, I wasn't clear enough, I just need the XHTML code, no
behind-the-scenes Ruby or PHP or stuff. ;-)

There are mechanize, hpricot and a few other alternatives that can
help you there.

Cheers

robert
 
D

Daniel Huckstep

If you just need to get it, for archive or something, and just chose
ruby, have a look at httrack. Not ruby, just its own app, but it
mirrors pages.

- Daniel
 
J

Joshua Muheim

Daniel said:
If you just need to get it, for archive or something, and just chose
ruby, have a look at httrack. Not ruby, just its own app, but it
mirrors pages.

- Daniel

Thanks, I know httrack... had some problems with it lately, though...
;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,175
Messages
2,570,942
Members
47,491
Latest member
mohitk

Latest Threads

Top