open-uri and illegal url characters

B

bsagert

Hello, n00b here. I use open-uri to read a Yahoo .csv file of stock
and index quotes. Yahoo indices start with a circumflex ("^") which a
browser will convert to "%5e". The following line is rejected by Yahoo
(andRuby) ==>s=open('http://download.finance.yahoo.com
/d/quotes.csv?s=^DJI,^SPX,^IXIC&f=sl1d1t1nohgv&e=.csv').read
Is there a Ruby method that will automatically convert illegal
characters into url-speak? Thanks, Bill
 
B

bsagert

Hello, n00b here. I use open-uri to read a Yahoo .csv file of stock
and index quotes. Yahoo indices start with a circumflex ("^") which a
browser will convert to "%5e". The following line is rejected by Yahoo
(andRuby) ==>s=open('http://download.finance.yahoo.com/d/quotes.csv?s=^DJI,^SPX,^IXIC&f=sl1d1t1nohgv&e=.csv').read
Is there a Ruby method that will automatically convert illegal
characters into url-speak? Thanks, Bill

Oops, that url is ==> http://download.finance.yahoo.com/d/quotes.csv?s=^DJI,^SPX,^IXIC&f=sl1d1t1nohgv&e=.csv
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top