[Dxspider-support] QRZ.PL rewrite

Ricardo Suarez lu9da at qsl.net
Sun Sep 6 13:28:57 BST 2009


Good job, but is a secure waste of time, the owner of qrz.com NOT want us as 
users, he wants us as readers of commercial announces, non better 
demostration of this the aleatory lines added on the qrz web page. For this 
cause I run on my new approach to solve the cluster´s dx information.

If you want try this way, you can see it works for 3 or 4 days and then 
stops.

Rick LU9DA
----- Original Message ----- 
From: "IZ5FSA" <iz5fsa at gmail.com>
To: "The DXSpider Support list" <dxspider-support at dxcluster.org>; 
<retedxcitalia at yahoogroups.com>
Sent: Sunday, September 06, 2009 8:22 AM
Subject: [Dxspider-support] QRZ.PL rewrite


I'm working on previous QRZ.pl Ricardo's script.
This is the file.
It seems to work fine on IZ5FSA-6 (iz5fsa.homedns.org:8000).
Feel free to use and improve it.
If any sysop improve the script, please, tell us on the list!!!
If I have time, I'll try not to use mechanize lib.
------------------------------
Sto ancora lavorando sul comando QRZ.pl di Ricardo.
Ecco di seguito il file.
Sembra funzionare bene su IZ5FSA-6 (iz5fsa.homedns.org:8000)
Usatelo e miglioratelo.
I sysop che lo modificano, per favore, lo dicano in lista!!!
Se avrò tempo cercherò di usare un metodo che non usi la lib mechanize.


73s de Leo, IZ5FSA



###########
#
# Query the QRZ Database server for a callsign
#
# Copyright (c) 2001 Dirk Koopman G1TLH
#
# modified on 5/13/2009 Ricardo Suarez LU9DA to work with the new
QRZ.COM style
# modified on September, 6th 2009 by IZ5FSA
#
# need for WWW:Mechanize ! download it from CPAN
#
# working under test on IZ5FSA-6 cluster (iz5fsa.homedns.org:8000)

use WWW::Mechanize;

my ($self, $line) = @_;
my @list = split /\s+/, $line; # generate a list of callsigns
my $l;
my $call = $self->call;
my @out;
my $url;
my $page;
my $count;
my $linea;
my $indx;

return (1, $self->msg('e24')) unless $Internet::allow;
return (1, "SHOW/QRZ <callsign>, e.g. SH/QRZ W1AW") unless @list;

my $url = "http://qrz.com/db/@list";

my $mechanize = WWW::Mechanize->new(autocheck => 1);
$mechanize->get($url);
$page = $mechanize->content;

my @tabla = split(/\n/, $page);
foreach $linea (@tabla) {
 if ($linea =~ m/class="csignm"/) {
  $linea =~ s/<[a-z|A-Z|0-9|"|=|(|)|\/|\s]+>//g;
  push @out, $linea;
 }
 if ($linea =~ m/class="i/) {
  $linea =~ s/<[a-z|A-Z|0-9|"|=|(|)|\/|\s]+>//g;
  $linea =~ s/^[a-z|A-Z|0-9]+\s[a-z|A-Z|0-9]+\s[a-z|A-Z|0-9]+$//g;
  push @out, $linea;
 }
 if ($linea =~ m/QSL Info:/) {
  $linea =~ s/<tr><td class=\"dh\">//;
  $linea =~ s/<\/td><td class=\"dw\">//;
  $linea =~ s/<\/td><\/td>//;
  push @out, $linea;
 }
 if ($linea =~ m/Previous:/) {
  $linea =~ s/<tr><td class=\"dh\">//;
  $linea =~ s/<\/td><td class=\"di\">//;
  $linea =~ s/<\/td><\/td>//;
  push @out, $linea;
 }
 if ($linea =~ m/Grid Square:/) {
  $linea =~ s/<tr><td class=\"dh\">//;
  $linea =~ s/<\/td><td class=\"di\">//;
  $linea =~ s/<\/td><\/td>//;
  push @out, "\n$linea";
 }
}
return (1, @out);


_______________________________________________
Dxspider-support mailing list
Dxspider-support at dxcluster.org
http://mailman.tobit.co.uk/mailman/listinfo/dxspider-support 




More information about the Dxspider-support mailing list