line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
# $Id: BySellerID.pm,v 2.14 2014-09-01 21:49:09 Martin Exp $ |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
=head1 NAME |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
WWW::Search::Ebay::BySellerID - backend for searching eBay for items offered by a particular seller |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 SYNOPSIS |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
use WWW::Search; |
11
|
|
|
|
|
|
|
my $oSearch = new WWW::Search('Ebay::BySellerID'); |
12
|
|
|
|
|
|
|
my $sQuery = WWW::Search::escape_query("martinthurn"); |
13
|
|
|
|
|
|
|
$oSearch->native_query($sQuery); |
14
|
|
|
|
|
|
|
while (my $oResult = $oSearch->next_result()) |
15
|
|
|
|
|
|
|
{ print $oResult->url, "\n"; } |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 DESCRIPTION |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
See L for details. |
20
|
|
|
|
|
|
|
The query string must be an eBay seller ID. |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
This class is an Ebay specialization of WWW::Search. |
23
|
|
|
|
|
|
|
It handles making and interpreting Ebay searches |
24
|
|
|
|
|
|
|
F. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
This class exports no public interface; all interaction should |
27
|
|
|
|
|
|
|
be done through L objects. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 NOTES |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Searches only for items offered by eBay sellers whose ID matches exactly. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
See L for explanation of the results. |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 SEE ALSO |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
To make new back-ends, see L. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 BUGS |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Please tell the author if you find any! |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 AUTHOR |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Martin 'Kingpin' Thurn, C, L. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 LICENSE |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Copyright (C) 1998-2009 Martin 'Kingpin' Thurn |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=cut |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
package WWW::Search::Ebay::BySellerID; |
54
|
|
|
|
|
|
|
|
55
|
1
|
|
|
1
|
|
2479
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
22
|
|
56
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
23
|
|
57
|
|
|
|
|
|
|
|
58
|
1
|
|
|
1
|
|
5
|
use base 'WWW::Search::Ebay'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
326
|
|
59
|
|
|
|
|
|
|
our |
60
|
|
|
|
|
|
|
$VERSION = do { my @r = (q$Revision: 2.14 $ =~ /\d+/g); sprintf "%d."."%03d" x $#r, @r }; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub _native_setup_search |
63
|
|
|
|
|
|
|
{ |
64
|
0
|
|
|
0
|
|
|
my ($self, $sQuery, $rh) = @_; |
65
|
|
|
|
|
|
|
# As of 2013-03: |
66
|
|
|
|
|
|
|
# http://www.ebay.com/sch/allhypedup82/m.html?_ipg=200&_sop=1&_rdc=1 |
67
|
0
|
|
|
|
|
|
$rh->{search_host} = 'http://www.ebay.com'; |
68
|
0
|
|
|
|
|
|
$rh->{search_path} = qq'/sch/$sQuery/m.html'; |
69
|
|
|
|
|
|
|
$self->{_options} = { |
70
|
|
|
|
|
|
|
_ipg => $self->{_hits_per_page}, |
71
|
0
|
|
|
|
|
|
_rdc => 1, |
72
|
|
|
|
|
|
|
_sop => 1, |
73
|
|
|
|
|
|
|
}; |
74
|
0
|
|
|
|
|
|
return $self->SUPER::_native_setup_search($sQuery, $rh); |
75
|
|
|
|
|
|
|
# Old version: |
76
|
0
|
|
|
|
|
|
$rh->{'MfcISAPICommand'} = 'MemberSearchResult'; |
77
|
0
|
|
|
|
|
|
$rh->{'frompage'} = 'itemsbyseller'; |
78
|
0
|
|
|
|
|
|
$rh->{'sofindtype'} = '26'; |
79
|
0
|
|
|
|
|
|
$rh->{'userid'} = $sQuery; |
80
|
|
|
|
|
|
|
# $rh->{'completed'} = 1; # Also return completed auctions |
81
|
|
|
|
|
|
|
# $rh->{'since'} = 30; # The oldest possible |
82
|
|
|
|
|
|
|
# $rh->{'include'} = 1; # also return bidders email addresses (only |
83
|
|
|
|
|
|
|
# possible if you login) |
84
|
0
|
|
|
|
|
|
$rh->{'fcm'} = 0; # Whether to return "similar" user ids |
85
|
0
|
|
|
|
|
|
$rh->{'frpp'} = '200'; # Results per page |
86
|
0
|
|
|
|
|
|
$rh->{'submit'} = 'Search'; |
87
|
|
|
|
|
|
|
# Don't know what the rest are for: |
88
|
0
|
|
|
|
|
|
$rh->{'fcl'} = '3'; |
89
|
0
|
|
|
|
|
|
$rh->{'amp;sspagename'} = 'h:h:advsearch:US'; |
90
|
0
|
|
|
|
|
|
$rh->{'sacat'} = '-1'; |
91
|
0
|
|
|
|
|
|
$rh->{'nojspr'} = 'y'; |
92
|
0
|
|
|
|
|
|
$rh->{'catref'} = 'C5'; |
93
|
0
|
|
|
|
|
|
$rh->{'from'} = 'R7'; |
94
|
0
|
|
|
|
|
|
$rh->{'pfid'} = '0'; |
95
|
0
|
|
|
|
|
|
return $self->SUPER::_native_setup_search('', $rh); |
96
|
|
|
|
|
|
|
} # _native_setup_search |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
sub _columns_NOT_NEEDED |
99
|
|
|
|
|
|
|
{ |
100
|
0
|
|
|
0
|
|
|
my $self = shift; |
101
|
|
|
|
|
|
|
# This is for basic USA eBay: |
102
|
0
|
|
|
|
|
|
return qw( enddate price repeat bids ); |
103
|
|
|
|
|
|
|
} # _columns |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
1; |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
__END__ |