From: pharrington Date: 2010-02-04T13:15:10+09:00 Subject: Re: Why this web page stop my "open" action [open-uri]? On Feb 3, 10:50 pm, Tao Ji wrote: > Hello, > Need your help to find out what stop my "open" action. I'm using > open-uri to get the webpages fromhttp://quotes.163.com. When I try open > other pages it works pefectly but spit out errors when I try to get the > stock quote information. > > Can you give me some hints? > > Below is my sample code: > ============================================ > require "open-uri" > url_news = "http://news.163.com/10/0204/01/5UL33070000120GR.html" # a > normal news page from 163.com > url_600036 = "http://quotes.163.com/corp/1036/code=600036.html" # a > stock info page from 163.com, this is problematic page > url_blank = "http://news.163.com/10/0204/01/5UL22070000120GR.html" # a > request to a nonexisted page > #response = open(url_news) # I can go smoothly > #response = open(url_blank) # also no error > response = open(url_600036) # Yes error comes here > puts "Character set is #{response.charset}" > puts "Size is #{response.size}" > =============================================== > -- > Posted viahttp://www.ruby-forum.com/. Is the error you're getting "SocketError: getaddrinfo: Name or service not known"? If not, copy and paste the full error.