with require ''open-uri'' I get a time-out error for: open("http://www.digg.com") and any other digg.com pages (like for http://digg.com/rss/index.xml) If I use any other url everything works fine. (and http://www.digg.com is available in the browser) Any idea? Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 3/12/07, rosoft2001 <adingod-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > with > require ''open-uri'' > > > I get a time-out error for: > > open("http://www.digg.com") > > and any other digg.com pages (like for http://digg.com/rss/index.xml) > > If I use any other url everything works fine. (and http://www.digg.com > is available in the browser)The other day I noticed the same, but using the curb bindings for libcurl. The connection just hangs. It''s good to know this isn''t a curb bug, at least! jeremy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I found it: just use open(url.to_s, "User-Agent" => "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)" ) probably they reject requests without an User-Agent... On Mar 12, 10:19 pm, "Jeremy Kemper" <jer...-w7CzD/W5Ocjk1uMJSBkQmQ@public.gmane.org> wrote:> On 3/12/07, rosoft2001 <adin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > with > > require ''open-uri'' > > > I get a time-out error for: > > > open("http://www.digg.com") > > > and any other digg.com pages (like forhttp://digg.com/rss/index.xml) > > > If I use any other url everything works fine. (andhttp://www.digg.com > > is available in the browser) > > The other day I noticed the same, but using the curb bindings for libcurl. > > The connection just hangs. It''s good to know this isn''t a curb bug, at least! > > jeremy--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---