line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package WWW::Search::Ebay::IT; |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
219610
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
5
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
42
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our |
8
|
|
|
|
|
|
|
$VERSION = 2.106; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
WWW::Search::Ebay::IT - backend for searching auctions at eBay Italy |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 SYNOPSIS |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
use WWW::Search; |
17
|
|
|
|
|
|
|
my $oSearch = new WWW::Search('Ebay::IT'); |
18
|
|
|
|
|
|
|
my $sQuery = WWW::Search::escape_query("Yakface"); |
19
|
|
|
|
|
|
|
$oSearch->native_query($sQuery); |
20
|
|
|
|
|
|
|
while (my $oResult = $oSearch->next_result()) |
21
|
|
|
|
|
|
|
{ print $oResult->url, "\n"; } |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 DESCRIPTION |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Acts just like WWW::Search::Ebay. |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 AUTHOR |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
Martin 'Kingpin' Thurn, C, L. |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=cut |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
1
|
|
3
|
use Carp; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
57
|
|
34
|
1
|
|
|
1
|
|
505
|
use WWW::Search::Ebay 2.258; |
|
1
|
|
|
|
|
12556
|
|
|
1
|
|
|
|
|
50
|
|
35
|
1
|
|
|
1
|
|
9
|
use base 'WWW::Search::Ebay'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
268
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub _native_setup_search |
38
|
|
|
|
|
|
|
{ |
39
|
2
|
|
|
2
|
|
4987
|
my ($self, $native_query, $rhOptsArg) = @_; |
40
|
2
|
|
|
|
|
5
|
$self->{search_host} = 'http://www.ebay.it'; |
41
|
2
|
|
|
|
|
14
|
return $self->SUPER::_native_setup_search($native_query, $rhOptsArg); |
42
|
|
|
|
|
|
|
} # _native_setup_search |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub _result_count_pattern |
46
|
|
|
|
|
|
|
{ |
47
|
2
|
|
|
2
|
|
12288997
|
return qr'(\d+)\s+(oggetti|inserzioni|risultati)'; |
48
|
|
|
|
|
|
|
} # _result_count_pattern |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub _next_text |
52
|
|
|
|
|
|
|
{ |
53
|
|
|
|
|
|
|
# The text of the "Next" button, localized: |
54
|
0
|
|
|
0
|
|
0
|
return 'Avanti'; |
55
|
|
|
|
|
|
|
} # _next_text |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub _currency_pattern |
58
|
|
|
|
|
|
|
{ |
59
|
16
|
|
|
16
|
|
123409
|
my $self = shift; |
60
|
|
|
|
|
|
|
# A pattern to match all possible currencies found in eBay listings |
61
|
|
|
|
|
|
|
# (if one character looks weird, it's really a British Pound symbol |
62
|
|
|
|
|
|
|
# but Emacs shows it wrong): |
63
|
16
|
|
|
|
|
42
|
my $W = $self->whitespace_pattern; |
64
|
16
|
|
|
|
|
195
|
return qr{(?:US\s?\$|£|EUR)$W*[\d.,]+}; # } } # Emacs indentation bugfix |
65
|
|
|
|
|
|
|
} # _currency_pattern |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub _preprocess_results_page_OFF |
68
|
|
|
|
|
|
|
{ |
69
|
0
|
|
|
0
|
|
|
my $self = shift; |
70
|
0
|
|
|
|
|
|
my $sPage = shift; |
71
|
|
|
|
|
|
|
# print STDERR Dumper($self->{response}); |
72
|
|
|
|
|
|
|
# For debugging: |
73
|
0
|
|
|
|
|
|
print STDERR $sPage; |
74
|
0
|
|
|
|
|
|
exit 88; |
75
|
|
|
|
|
|
|
} # _preprocess_results_page |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub _columns |
78
|
|
|
|
|
|
|
{ |
79
|
0
|
|
|
0
|
|
|
my $self = shift; |
80
|
|
|
|
|
|
|
# This is for IT: |
81
|
0
|
|
|
|
|
|
return qw( paypal bids price repeat shipping enddate ); |
82
|
|
|
|
|
|
|
} # _columns |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
sub _process_date_abbrevs |
85
|
|
|
|
|
|
|
{ |
86
|
0
|
|
|
0
|
|
|
my $self = shift; |
87
|
0
|
|
|
|
|
|
my $s = shift; |
88
|
|
|
|
|
|
|
# Convert Italian abbreviations for units of time to something |
89
|
|
|
|
|
|
|
# Date::Manip can parse (namely, English words): |
90
|
0
|
|
|
|
|
|
$s =~ s!(\d)g!$1 days!; |
91
|
0
|
|
|
|
|
|
$s =~ s!(\d)h!$1 hours!; |
92
|
0
|
|
|
|
|
|
$s =~ s!(\d)m!$1 minutes!; |
93
|
0
|
|
|
|
|
|
return $s; |
94
|
|
|
|
|
|
|
} # _process_date_abbrevs |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
1; |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
__END__ |