Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Open-URI and percent sign in url
lrlebron@gmail.com
9/27/2007 3:50:00 PM
I am trying to use open-uri to open the following url
http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-4.html#%...
and I'm getting the following error
:/ruby/lib/ruby/1.8/uri/common.rb:436:in `split': bad URI(is not
URI?):
http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-4.html#%...
(URI::InvalidURIError)
from c:/ruby/lib/ruby/1.8/uri/common.rb:485:in `parse'
from c:/ruby/lib/ruby/1.8/open-uri.rb:29:in `open'
from mitbook.rb:14
However, the url works fine in the browser.
thanks,
Luis
2 Answers
Eric Hodel
9/27/2007 4:15:00 PM
0
On Sep 27, 2007, at 08:58 , lrlebron@gmail.com wrote:
> I am trying to use open-uri to open the following url
>
http://mitpress.mit.edu/sicp/full-text/book/book-Z-...
> _toc_start
> and I'm getting the following error
%_t is not a valid % escape sequence. You probably want ...#%25_toc...
> However, the url works fine in the browser.
The browser is more forgiving, which is nice for people like my parents.
lrlebron@gmail.com
9/27/2007 4:24:00 PM
0
On Sep 27, 11:15 am, Eric Hodel <drbr...@segment7.net> wrote:
> On Sep 27, 2007, at 08:58 , lrleb...@gmail.com wrote:
>
> > I am trying to use open-uri to open the following url
> >
http://mitpress.mit.edu/sicp/full-text/book/book-Z-...
> > _toc_start
> > and I'm getting the following error
>
> %_t is not a valid % escape sequence. You probably want ...#%25_toc...
>
> > However, the url works fine in the browser.
>
> The browser is more forgiving, which is nice for people like my parents.
Thanks. That worked!
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Open-URI and percent sign in url
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password