Changeset 3521 for lang/perl/WWW-NicoVideo
- Timestamp:
- 12/24/07 14:16:43 (11 months ago)
- Location:
- lang/perl/WWW-NicoVideo/trunk/lib/WWW
- Files:
-
- 3 modified
-
NicoVideo.pm (modified) (3 diffs)
-
NicoVideo/Entry.pm (modified) (1 diff)
-
NicoVideo/Scraper.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/WWW-NicoVideo/trunk/lib/WWW/NicoVideo.pm
r2197 r3521 11 11 use LWP::UserAgent; 12 12 use HTTP::Cookies; 13 use URI;14 13 use URI::QueryParam; 15 14 use WWW::NicoVideo::Entry; … … 103 102 *getEntriesByKeyword = \&getEntriesByKeywords; 104 103 104 sub getNewEntries 105 { 106 my $self = shift; 107 $self->getEntries("newarrival", @_); 108 } 109 110 *getNewEntry = \&getNewEntries; 111 112 sub getRecentEntries 113 { 114 my $self = shift; 115 $self->getEntries("recent", @_); 116 } 117 118 *getRecentEntry = \&getRecentEntries; 119 105 120 sub getEntries 106 121 { … … 120 135 } 121 136 122 my $url = n ew URI(nicoURL($type, @keys));137 my $url = nicoURL($type, @keys); 123 138 $url->query_param_append(sort => $sort) if(defined $sort); 124 139 $url->query_param_append(order => $order) if(defined $order); -
lang/perl/WWW-NicoVideo/trunk/lib/WWW/NicoVideo/Entry.pm
r2197 r3521 49 49 return; 50 50 }; 51 $ent->{url} ||= $uri; 51 52 52 53 @$self{keys %$ent} = values %$ent; -
lang/perl/WWW-NicoVideo/trunk/lib/WWW/NicoVideo/Scraper.pm
r2189 r3521 29 29 process('//div[@class="thumb_frm"]', 30 30 'entries[]' => scraper { 31 process('/div/div/div /p/a/img',31 process('/div/div/div[3]/a/img', 32 32 imgUrl => '@src', 33 33 imgWidth => '@width', … … 79 79 $postDateTimeStr =~ 80 80 /(\d+)年(\d+)月(\d+)日\s+(\d+)\D+(\d+)\D+(\d+)/; 81 timelocal($6, $5, $4, $3, $2 , $1); }81 timelocal($6, $5, $4, $3, $2 - 1, $1 - 1900); } 82 82 ); 83 83 process('//div[@id="PAGEBODY"]/div/div/p[3]',
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)