1
2
3
4
5
6
hash160: "11dbe48cc6b617f9c6adaf4d9ed5f625b1c7cb59"
address "12dRugNcdxK39288NjcDV4GX7rMsKCGn6B"
n_tx: 2029
total_received: 2468449570426
total_sent: 2426599405906
final_balance: 41850164520
1 2 3 4 5 6 7 8 9 10 11 12 13 14
use 5.020; use strict; use warnings; use LWP::Simple; use JSON; my $address = '12dRugNcdxK39288NjcDV4GX7rMsKCGn6B'; my $content = get("https://blockchain.info/rawaddr/$address"); defined $content or die "Falsche Adresse: '$address'"; my $result = decode_json $content; say "Anzahl Transaktionen: $result->{n_tx}"; say "Insgesamt erhalten: ", $result->{total_received}/1E8; say "Saldo: ", $result->{final_balance}/1E8;
2020-03-07T10:25:55 biancaUnd dann per Regex die Werte ziehen.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
use Web::Query::LibXML 'wq'; my $post_wrapper = wq('https://www.perl-community.de/bat/poard/thread/20750') ->find('div.author > a:contains("clms")') ->parent->parent; my $posting = $post_wrapper->find('.posting_content'); $posting->find('blockquote')->remove; my $post_text = $posting->text; my @permalinks; $post_wrapper->find('.anchor a')->each(sub { push @permalinks, $_->attr('href'); });