From a43f2cff1ee038cddd85b09cdb188db2fcef2c78 Mon Sep 17 00:00:00 2001 From: Matthias Merz Date: Thu, 25 Apr 2019 21:54:15 +0200 Subject: [PATCH] re-add date parsing --- Finance/Quote/DKB.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Finance/Quote/DKB.pm b/Finance/Quote/DKB.pm index caefe5c..7b5b148 100644 --- a/Finance/Quote/DKB.pm +++ b/Finance/Quote/DKB.pm @@ -117,11 +117,13 @@ sub dkb if (@units) { $info{$stock,'currency'} = $units[0]->as_text; }; - #my @dates = $parser->findnodes( '//span[@class="dkbPortraitDate"]'); - #if (@dates) { - # #$info{$stock,'date'} = $dates[0]->as_text; - # $quoter->store_date(\%info, $stock, {eurodate => $dates[0]->as_text}); - #}; + my @dates = $parser->findnodes( '//div[@class="exchangeLine"]/span'); + if (@dates) { + my $tradedate = $dates[0]->as_text; + $tradedate =~ s/.*(\d\d\.\d\d\.\d\d \d\d:\d\d).*/\1/g; + $info{$stock,'date'} = $dates[0]->as_text; + $quoter->store_date(\%info, $stock, {eurodate => $dates[0]->as_text}); + }; $info{$stock,'timezone'} = 'Europe/Berlin'; #$info{$stock,'currency'} = 'EUR'; }