Finance/Quote/Morningstarde.pm: generalize: lookup in id-mapping, and regard symbol as morningstar-ID otherwise
This commit is contained in:
parent
8a7bca09f3
commit
85e8f4905b
@ -42,11 +42,14 @@ sub labels { return (morningstarde => \@labels); }
|
|||||||
|
|
||||||
|
|
||||||
sub get_stock_url {
|
sub get_stock_url {
|
||||||
my $stock_wkn = shift;
|
my $stock_symbol = shift;
|
||||||
|
|
||||||
my $id = $idmap{lc($stock_wkn)};
|
# check ID-map for symbol, otherwise interpret as an ID
|
||||||
|
my $id = $idmap{lc($stock_symbol)};
|
||||||
if (defined($id)) {
|
if (defined($id)) {
|
||||||
return baseurl() . $id;
|
return baseurl() . $id;
|
||||||
|
} else {
|
||||||
|
return baseurl() . $stock_symbol;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user