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: 4513110"] Thank you for your response. This linux tutorial seems to be old, lots of it does not work 0. I think net http get only returns one object, I think that is why I am geting an error when I try to look at resp h=Net::HTTP.new('[URL="http://www.livejournal.com"]www.livejournal.com[/URL]', 80) resp, data = h.get("[URL]http://#[/URL]{person}.livejournal.com/profile",nil) 1. I do have the book and also sam's ruby, but I did not find this: ([^'&]*) in this expression: /userinfo.bml\?user=([^'&]*)\'/ the parenthesis means treat it as a group, ^ means from start ... but I can't decipher the rest. he also uses ([^<]*), ([^"]*), somehow the expression is linked to an argument $1 if token =~ /http:\/\/([^'&]*).livejournal.com\/profile/ friend_arr.push $1 in another example the expression is linked to two arguments $1 and $2 if line =~ /<ahref='(http"\/\/[URL="http://www.livejournal.com\/users\/[^\/]*\/[^']*thread[^']*"]www.livejournal.com\/users\/[^\/]*\/[^']*thread[^']*[/URL])'>.*<\/td><\/tr><tr><td>(.*)<\ p style='margin:/ and logging url = $1 comment = $2 3. Oups, just a typo, I guess spaces between arguments is ok then. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
how to view net http get response for a web spider tutorial
Top