diff options
author | Elan Ruusamäe | 2010-10-05 11:09:50 (GMT) |
---|---|---|
committer | Elan Ruusamäe | 2010-10-05 11:09:50 (GMT) |
commit | c3ac1ebdbcf8a550924e05defe6832f5a536d0e3 (patch) | |
tree | c31c91f0890f79963be19ce362f5d5362284285f | |
parent | 32ec50ee7712682492d86479478cf2d384f3ead5 (diff) | |
download | pldnotify-c3ac1ebdbcf8a550924e05defe6832f5a536d0e3.zip pldnotify-c3ac1ebdbcf8a550924e05defe6832f5a536d0e3.tar.gz |
- make urls unique in perl already, 1m win for media info
Changed files:
pldnotify.awk -> 1.95
-rw-r--r-- | pldnotify.awk | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pldnotify.awk b/pldnotify.awk index 70fa742..9085c6f 100644 --- a/pldnotify.awk +++ b/pldnotify.awk @@ -200,10 +200,14 @@ function extract_links_cmd(tmpfile) { my $content = join q//, <>; \ my $root = new HTML::TreeBuilder; \ $root->parse($content); \ - my $links_r = $root->extract_links(); \ \ + my %links = (); \ for (@{$root->extract_links(qw(a iframe))}) { \ my($link, $element, $attr, $tag) = @$_; \ + $links{$link} = $tag; \ + } \ + \ + while (my($link, $tag) = each %links) { \ print $tag, q/ /, $link, $/; \ } \ ' " tmpfile |