Yahoo finance quotes retrieval failing

Yahoo finance quotes retrieval failing

am 31.08.2007 09:22:10 von bgoosh

I have a simple old Perl script that retrieves stock quotes, the
essence of which does:

$yahoo_string = "/d/quotes.csv\?s=$symbol_list&f=sl9d1t1&e=.csv";
# Go and get the quotes
$FH = getwww ("quote.yahoo.com", 80, $yahoo_string);

It's worked fine for years; sometime between 8/21/07 and 8/28/07
it stopped working. Now instead of a CSV list I get a Yahoo web
page response complaining about "HTTP/1.1 400 Bad Request" and
also:

Sorry, Bad Request.

Your browser sent a request that this server could not
understand. client sent HTTP/1.1 request without hostname (see
RFC2616 section 14.23):
/d/quotes.csv

I poked around on the web and couldn't find any recent mention of
this. (There are lots of examples using this yahoo site/page; I
also tried finance.yahoo.com and it fails the same way). Also, I
can find no way of contacting Yahoo.

Anybody know how to fix this?

Or, I recall reading about a package Finance:Quotes or something
like that, does that still work? If so I could probably change
my script to use that instead.

--
You're only as old as you feel... the next day.

Re: Yahoo finance quotes retrieval failing

am 31.08.2007 15:54:23 von Ben Morrow

Quoth bgoosh <9fyh-t1fo@dea.spamcon.org>:
> I have a simple old Perl script that retrieves stock quotes, the
> essence of which does:
>
> $yahoo_string = "/d/quotes.csv\?s=$symbol_list&f=sl9d1t1&e=.csv";
> # Go and get the quotes
> $FH = getwww ("quote.yahoo.com", 80, $yahoo_string);
>
> It's worked fine for years; sometime between 8/21/07 and 8/28/07
> it stopped working. Now instead of a CSV list I get a Yahoo web
> page response complaining about "HTTP/1.1 400 Bad Request" and
> also:

>
> Anybody know how to fix this?

Use LWP::Simple instead.

> Or, I recall reading about a package Finance:Quotes or something
> like that, does that still work? If so I could probably change
> my script to use that instead.

http://search.cpan.org/

Ben

Re: Yahoo finance quotes retrieval failing

am 07.09.2007 07:40:16 von bgoosh

Ben Morrow wrote:

>
>Quoth bgoosh <9fyh-t1fo@dea.spamcon.org>:
>> I have a simple old Perl script that retrieves stock quotes, the
>> essence of which does:
>>
>> $yahoo_string = "/d/quotes.csv\?s=$symbol_list&f=sl9d1t1&e=.csv";
>> # Go and get the quotes
>> $FH = getwww ("quote.yahoo.com", 80, $yahoo_string);
>>
>> It's worked fine for years; sometime between 8/21/07 and 8/28/07
>> it stopped working. Now instead of a CSV list I get a Yahoo web
>> page response complaining about "HTTP/1.1 400 Bad Request" and
>> also:
>
>>
>> Anybody know how to fix this?
>
>Use LWP::Simple instead.
>
>> Or, I recall reading about a package Finance:Quotes or something
>> like that, does that still work? If so I could probably change
>> my script to use that instead.
>
>http://search.cpan.org/
>
>Ben

Thank you, Ben. Simply changing from the ancient getwww to LWP::Simple
fixed the problem.

--
A wok is what you throw at a wabbit.