use
5.008;
no
warnings
qw(uninitialized)
;
our
$VERSION
=
'1.02'
;
sub
default_settings {
my
$self
=
shift
->SUPER::default_settings;
$self
->{text_paragraph_type}=
'brbr_or_brandspace'
;
$self
->{book_has_chapters}=0;
$self
->{get_trunk_size}=2500;
$self
->{get_trunk_fresh_size}=250;
$self
;
}
sub
msg_init {
my
$self
=
shift
;
my
$msg
=
$self
->SUPER::msg_init;
$msg
->{CatalogInfo}=
'==>¿Æ¼¼ÒªÎŵÚ$pargs->{pageno}Ò³£º'
;
}
sub
get_alias {
'agr_cast'
;
}
sub
argv_default {
qw(pageno=i)
;
}
sub
argv_process {
my
(
$self
,
$pargs
)=
@_
;
if
(
defined
(
$pargs
->{pageno}) ){
$self
->go_catalog(
$pargs
);
}
else
{
$self
->argv_process_all(
$pargs
);
}
}
sub
argv_process_all {
my
(
$self
,
$pargs
)=
@_
;
for
(
$pargs
->{pageno}=1;
$pargs
->{pageno}<=
$self
->{catalog_max_pages};
$pargs
->{pageno}++) {
last
if
$self
->go_catalog(
$pargs
)==0;
}
}
sub
getpattern_catalog_get_bookargs_data {
<<'DATA';
£«</span><a href="#" onClick="MM_openBrWindow\('yao-text.asp\?id=(\d+)[^\)]+\)">([^<>]*)</a>[^<>\(]*\([^\)]+\)</TD>[^<>]*<TD>[^<>]*<font color=gray>([^<>]*)</font></TD>
DATA
}
sub
catalog_get_bookargs {
my
$self
=
shift
;
my
@a
=
@_
;
my
$pargs
=
$a
[0];
$pargs
->{id}=
$a
[1];
$pargs
->{title}=
$self
->parse_titleen(
$a
[2]);
$pargs
->{date}=
$self
->parse_titleen(
$a
[3]);
'OK'
;
}
sub
getpattern_catalog_get_next_data {
<<'DATA';
>ÏÂÒ»Ò³<
DATA
}
sub
getpattern_chapter_head_data {
<<'DATA';
align="left"></div>
DATA
}
sub
getpattern_chapter_end_data {
<<'DATA';
<br></TD>
DATA
}
sub
result_time {
my
(
$self
,
$pargs
) =
@_
;
if
(
$pargs
->{date}=~/^(\d+)Äê(\d+)ÔÂ(\d+)ÈÕ$/) {
return
$self
->string2time(
"$1-$2-$3"
);
}
else
{
return
$pargs
->{last_modified};
}
}
1;