line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#--------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
package Web::Scraper::BarnesNoble::WishList; |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# Copyright 2014 Christopher J. Madsen |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
# Author: Christopher J. Madsen |
7
|
|
|
|
|
|
|
# Created: 20 Jun 2014 |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify |
10
|
|
|
|
|
|
|
# it under the same terms as Perl itself. |
11
|
|
|
|
|
|
|
# |
12
|
|
|
|
|
|
|
# This program is distributed in the hope that it will be useful, |
13
|
|
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
14
|
|
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the |
15
|
|
|
|
|
|
|
# GNU General Public License or the Artistic License for more details. |
16
|
|
|
|
|
|
|
# |
17
|
|
|
|
|
|
|
# ABSTRACT: Create a Web::Scraper object for a Barnes & Noble wishlist |
18
|
|
|
|
|
|
|
#--------------------------------------------------------------------- |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our $VERSION = '0.004'; # VERSION |
21
|
|
|
|
|
|
|
# This file is part of App-BarnesNoble-WishListMinder 0.004 (December 20, 2014) |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
1
|
|
852
|
use 5.010; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
24
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
25
|
|
25
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
19
|
|
26
|
|
|
|
|
|
|
|
27
|
1
|
|
|
1
|
|
456
|
use Web::Scraper; |
|
1
|
|
|
|
|
57565
|
|
|
1
|
|
|
|
|
6
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
#===================================================================== |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub bn_scraper |
33
|
|
|
|
|
|
|
{ |
34
|
|
|
|
|
|
|
scraper { |
35
|
|
|
|
|
|
|
process 'div.wishListItem', 'books[]' => scraper { |
36
|
0
|
|
|
|
|
|
process qw(//input[@name="ItemEan"] ean @value), |
37
|
|
|
|
|
|
|
process qw(//h5[1]/a[1] title TEXT), |
38
|
|
|
|
|
|
|
process qw(//h5[1]/em[1]/a[1] author TEXT), |
39
|
|
|
|
|
|
|
process qw(div.wishListDateAdded date_added TEXT), |
40
|
|
|
|
|
|
|
process qw(//span[@class=~"listPriceValue"] list_price TEXT), |
41
|
|
|
|
|
|
|
process qw(//span[@class=~"onlinePriceValue"] price TEXT), |
42
|
|
|
|
|
|
|
process qw(//div[@class=~"onlineDiscount"] discount TEXT), |
43
|
|
|
|
|
|
|
process '//div[@class=~"eBooksPriority"]/select/option[@selected]', |
44
|
|
|
|
|
|
|
qw(priority @value), |
45
|
0
|
|
|
0
|
|
|
}; |
46
|
0
|
|
|
|
|
|
result 'books'; |
47
|
0
|
|
|
0
|
1
|
|
}; |
48
|
|
|
|
|
|
|
} # end bn_scraper |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
#===================================================================== |
51
|
|
|
|
|
|
|
# Package Return Value: |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
__END__ |