# Open-uri can read slashdot rss, but not digg rss?

**URL:** <https://www.ruby-forum.com/t/open-uri-can-read-slashdot-rss-but-not-digg-rss/89223>\
**Category:** Ruby\
**Created:** [March 18, 2007, 9:31pm UTC](https://www.ruby-forum.com/t/open-uri-can-read-slashdot-rss-but-not-digg-rss/89223 "2007-03-18T21:31:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 18, 2007, 9:31pm UTC](https://www.ruby-forum.com/t/open-uri-can-read-slashdot-rss-but-not-digg-rss/89223/1 "2007-03-18T21:31:14Z")

</div>

Here’s an irb session, this used to work, maybe something new about  
digg’s rss feed ?

irb(main):001:0\> require ‘open-uri’  
=\> true  
irb(main):002:0\> open(‘[Slashdot](http://rss.slashdot.org/Slashdot/)  
slashdot’).readlines.length  
=\> 263  
irb(main):003:0\> open(‘[http://www.digg.com/rss/](http://www.digg.com/rss/)  
containertechnology.xml’).readlines.length  
/usr/lib/ruby/1.8/timeout.rb:54:in `rbuf_fill': execution expired (Timeout::Error) from /usr/lib/ruby/1.8/timeout.rb:56:in `timeout’  
from /usr/lib/ruby/1.8/timeout.rb:76:in `timeout' from /usr/lib/ruby/1.8/net/protocol.rb:132:in `rbuf\_fill’  
from /usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil' from /usr/lib/ruby/1.8/net/protocol.rb:126:in `readline’  
from /usr/lib/ruby/1.8/net/http.rb:1988:in `read_status_line' from /usr/lib/ruby/1.8/net/http.rb:1977:in `read\_new’  
from /usr/lib/ruby/1.8/net/http.rb:1046:in `request' ... 8 levels... from /usr/lib/ruby/1.8/open-uri.rb:86:in `open’  
from (irb):3:in `irb_binding' from /usr/lib/ruby/1.8/irb/workspace.rb:52:in `irb\_binding’  
from /usr/lib/ruby/1.8/irb/workspace.rb:52

happens every time !

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 18, 2007, 9:51pm UTC](https://www.ruby-forum.com/t/open-uri-can-read-slashdot-rss-but-not-digg-rss/89223/2 "2007-03-18T21:51:16Z")

</div>

On Mar 18, 3:28 pm, “removed\_email\_address@domain.invalid” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> /usr/lib/ruby/1.8/timeout.rb:54:in `rbuf_fill': execution expired from /usr/lib/ruby/1.8/open-uri.rb:86:in `open’  
> from (irb):3:in `irb_binding' from /usr/lib/ruby/1.8/irb/workspace.rb:52:in `irb\_binding’  
> from /usr/lib/ruby/1.8/irb/workspace.rb:52
> 
> happens every time !

Digg wants a specific user-agent, like the one my FF uses. Why in the  
world would they do that ? What/who are they hoping to prevent. Do  
they really only want browsers connecting to there feeds ?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 19, 2007, 3:44pm UTC](https://www.ruby-forum.com/t/open-uri-can-read-slashdot-rss-but-not-digg-rss/89223/3 "2007-03-19T15:44:26Z")

</div>

They may just be keeping track of what user-agents are being used.  
Though browser sniffing is almost pointless.  
Should be easy enough to give it whatever string you like. “user-  
agent” is nothing but a string anyway, almost meaningless, because it  
isn’t guaranteed to be true or mean anything valid or verifiable.  
(like microsoft’s early corruption of it, to circumvent browser  
sniffing and blocking by starting it’s MSIE user-agent string with  
Mozilla 4.x (compatible… ))
