Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
how to view net http get response for a web spider tutorial
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="anne001, post: 4513129"] Thanks I was able to figure out the () once the [] part became clear to me. 1. I need some help running parse_journal.rb from parse_user.rb: --------------------------------------------------------------------------------------------- When I run the parse_journal.rb program: ruby parse_journal.rb "meep" "mizalaina" I get: meep mizalaina [URL]http://meep.livejournal.com/1328508.html?thread=2564732#t2564732[/URL] Ha ha ha! Awesome quote. the first two output lines echo the arguments, the program starts with ----------------------> require 'net/http' person= ARGV[0] watch_for= ARGV[1] puts person puts watch_for .... but when I try to execute parse_office.rb from parse_user.rb I don't get anything friend_arr.each do |friend| if friend == "meep" print "Parsing #{friend}'s. journal for #{person}'s. comments...\n"; f=File.new("#{person}_#{friend}.txt","w") f.puts %x[ruby parse_journal.rb #{friend} #{person}] f.close end end ie I only get Parsing meep's. journal for mizalaina's. comments... the puts in the parse_journal.rb are at the start of the file and should execute right away. What is the problem, why do the puts not execute, how do I debug this? 2. Where can I find information for ruby to help me meet the journal's bot requirements: a) webcrawlers should only make 5 get per second, b) cache the results of the bot's requests c) well formed user agent which includes contact email address for the bot maintainer. thank you for your help! [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
how to view net http get response for a web spider tutorial
Top