Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.20
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
perl5 /
Finance /
Quote /
[ HOME SHELL ]
Name
Size
Permission
Action
CurrencyRates
[ DIR ]
drwxr-xr-x
AEX.pm
5.76
KB
-rw-r--r--
ASEGR.pm
5.26
KB
-rw-r--r--
ASX.pm
10.78
KB
-rw-r--r--
AlphaVantage.pm
12.23
KB
-rw-r--r--
BSEIndia.pm
4.59
KB
-rw-r--r--
Bloomberg.pm
2.68
KB
-rw-r--r--
Bourso.pm
6.71
KB
-rw-r--r--
CSE.pm
3.13
KB
-rw-r--r--
Cdnfundlibrary.pm
5.34
KB
-rw-r--r--
Comdirect.pm
4.32
KB
-rw-r--r--
Currencies.pm
32.6
KB
-rw-r--r--
DWS.pm
4.36
KB
-rw-r--r--
Deka.pm
3.17
KB
-rw-r--r--
FTfunds.pm
11.55
KB
-rw-r--r--
Fidelity.pm
4.72
KB
-rw-r--r--
Finanzpartner.pm
4.05
KB
-rw-r--r--
Fondsweb.pm
5.29
KB
-rw-r--r--
Fool.pm
5.2
KB
-rw-r--r--
Fundata.pm
5.96
KB
-rw-r--r--
GoldMoney.pm
7.66
KB
-rw-r--r--
HU.pm
7.07
KB
-rw-r--r--
IEXCloud.pm
4.94
KB
-rw-r--r--
IndiaMutual.pm
4.71
KB
-rw-r--r--
MStaruk.pm
9.13
KB
-rw-r--r--
MorningstarAU.pm
5.05
KB
-rw-r--r--
MorningstarJP.pm
5.55
KB
-rw-r--r--
NSEIndia.pm
4.87
KB
-rw-r--r--
NZX.pm
3.25
KB
-rw-r--r--
OnVista.pm
7.54
KB
-rw-r--r--
Oslobors.pm
2.29
KB
-rw-r--r--
SEB.pm
3.96
KB
-rw-r--r--
SIX.pm
5.45
KB
-rw-r--r--
TMX.pm
5.83
KB
-rw-r--r--
TSP.pm
4.35
KB
-rw-r--r--
Tiaacref.pm
13.85
KB
-rw-r--r--
Tradeville.pm
3.88
KB
-rw-r--r--
Troweprice.pm
5
KB
-rw-r--r--
USFedBonds.pm
4.89
KB
-rw-r--r--
Union.pm
4.5
KB
-rw-r--r--
UserAgent.pm
3.25
KB
-rw-r--r--
XETRA.pm
4.59
KB
-rw-r--r--
YahooJSON.pm
8.21
KB
-rw-r--r--
ZA.pm
3.33
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : OnVista.pm
#!/usr/bin/perl -w # # Copyright (C) 1998, Dj Padzensky <djpadz@padz.net> # Copyright (C) 1998, 1999 Linas Vepstas <linas@linas.org> # Copyright (C) 2000, Yannick LE NY <y-le-ny@ifrance.com> # Copyright (C) 2000, Paul Fenwick <pjf@cpan.org> # Copyright (C) 2000, Brent Neal <brentn@users.sourceforge.net> # Copyright (C) 2001, Rob Sessink <rob_ses@users.sourceforge.net> # Copyright (C) 2005, Morten Cools <morten@cools.no> # Copyright (C) 2006, Dominique Corbex <domcox@sourceforge.net> # Copyright (C) 2008, Bernard Fuentes <bernard.fuentes@gmail.com> # Copyright (C) 2009, Erik Colson <eco@ecocode.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA # # 2017-01-10 Julian Wollrath <jwollrath@web.de> # # * (0.1) iniial release # package Finance::Quote::OnVista; require 5.005; use strict; use LWP::UserAgent; use HTTP::Request::Common; use HTML::TreeBuilder; use Encode; our $VERSION = '1.51'; # VERSION use vars qw($OnVista_URL); my $OnVista_URL = 'https://www.onvista.de'; sub methods {return (onvista => \&onvista);} sub labels {return ( onvista => [qw/name last date isodate time currency method exchange/] );} sub onvista { my $quoter = shift; my @stocks = @_; my (%info, $reply); my $ua = $quoter->user_agent(); foreach my $stock (@stocks) { my $queryUrl = "$OnVista_URL/suche/$stock"; $reply = $ua->request(GET $queryUrl); eval { my $tree = HTML::TreeBuilder->new_from_content(decode_utf8 $reply->content); my $row = $tree->look_down('_tag' => 'tr', 'class' => 'HERVORGEHOBEN'); my $link = $row->look_down('_tag' => 'a'); $queryUrl = $OnVista_URL . $link->attr('href'); $reply = $ua->request(GET $queryUrl); }; if ($@) { $info{ $stock, "success" } = 0; $info{ $stock, "errormsg" } = "Error retreiving $stock redirect: $@"; } if ($reply->is_success) { $info{ $stock, "success" } = 1; my $tree = HTML::TreeBuilder->new_from_content(decode_utf8 $reply->content); my @nameline = $tree->look_down('property', 'schema:name'); if (not @nameline) { @nameline = $tree->look_down('class', 'inline name'); if (not @nameline) { @nameline = $tree->look_down('class', 'ui medium header'); } } unless (@nameline) { $info{ $stock, "success" } = 0; $info{ $stock, "errormsg" } = "Stock name $stock not retrievable"; next; } my $name = $nameline[0]->as_text; $name =~ s/^\s+|\s+$//g; $info{ $stock, "name" } = $name; $info{ $stock, "method" } = "onvista"; my $exchange = $tree->look_down('property', 'schema:seller'); if ($exchange) { $info{ $stock, "exchange" } = $exchange->attr_get_i('content'); } my @currencyline = $tree->look_down('property', 'schema:priceCurrency'); if (not @currencyline) { @currencyline = $tree->look_down('id', 'current-quote-currency'); } if (@currencyline) { my $currency = $currencyline[0]->as_text; $info{ $stock, "currency" } = $currency; } else { @currencyline = $tree->look_down('class', 'price'); my $currency = ( $currencyline[0]->content_list )[0]; $currency =~ s/.* //; $info{ $stock, "currency" } = $currency; } my @lastline = $tree->look_down('data-push', qr/.*last.*Stock/); if (not @lastline) { @lastline = $tree->look_down('id', 'current-quote-price'); } if (not @lastline) { @lastline = $tree->look_down('class', 'price'); if (@lastline) { my $last = ( $lastline[0]->content_list )[0]; $last =~ s/,/./; $last =~ s/ .*//; $info{ $stock, "last" } = $last; } else { my $last = $tree->look_down('property', 'schema:price'); if ($last) { $info{ $stock, "last" } = $last->attr_get_i('content'); } } } else { my $last = $lastline[0]->as_text; $last =~ s/,/./; $info{ $stock, "last" } = $last; } my @datetimeline = $tree->find_by_tag_name('cite'); if (not @datetimeline) { @datetimeline = $tree->look_down('id', 'current-quote-datetime'); if (@datetimeline) { my $datetime = $datetimeline[0]->as_text; my $date = substr($datetime, 4, 2)."/".substr($datetime, 1, 2)."/".substr($datetime, 7, 4); my $time = substr($datetime, 13, 8); $info{ $stock, "date" } = $date; $info{ $stock, "time" } = $time; } else { @datetimeline = $tree->look_down('class', 'datetime'); my $datetime = ( $datetimeline[0]->content_list )[0]; my $date = substr($datetime, 3, 2)."/".substr($datetime, 0, 2)."/".substr($datetime, 6, 4); my $time = substr($datetime, 12, 8); $info{ $stock, "date" } = $date; $info{ $stock, "time" } = $time; } } else { my $datetime = $datetimeline[0]->as_text; my $date = substr($datetime, 5, 2)."/".substr($datetime, 2, 2)."/".substr($datetime, 8, 4); my $time = substr($datetime, 14, 8); $info{ $stock, "date" } = $date; $info{ $stock, "time" } = $time; } $quoter->store_date(\%info, $stock, {usdate => $info{$stock, "date"}}); $tree->delete; } else { $info{ $stock, "success" } = 0; $info{ $stock, "errormsg" } = "Error retreiving $stock"; } } return wantarray() ? %info : \%info; return \%info; } 1; =head1 NAME Finance::Quote::OnVista - Obtain quotes from OnVista. =head1 SYNOPSIS use Finance::Quote; $q = Finance::Quote->new; %info = Finance::Quote->fetch("onvista","ml"); # Only query OnVista =head1 DESCRIPTION This module fetches information from OnVista, https://www.onvista.de. All stocks are available. This module is loaded by default on a Finance::Quote object. It's also possible to load it explicitly by placing "onvista" in the argument list to Finance::Quote->new(). Information obtained by this module may be covered by www.onvista.de terms and conditions See https://www.onvista.de/ for details. =head1 LABELS RETURNED The following labels may be returned by Finance::Quote::OnVista : name, last, date, isodate, time, currency, method, exchange. =head1 SEE ALSO OnVista (german web site), https://www.onvista.de =cut
Close