File Coverage

lib/Comics/Fetcher/Cascade.pm
Criterion Covered Total %
statement 21 109 19.2
branch 0 42 0.0
condition 0 28 0.0
subroutine 7 8 87.5
pod 0 1 0.0
total 28 188 14.8


line stmt bran cond sub pod time code
1             #! perl
2              
3 1     1   946 use strict;
  1         2  
  1         30  
4 1     1   6 use warnings;
  1         2  
  1         24  
5 1     1   5 use utf8;
  1         2  
  1         4  
6 1     1   21 use Carp;
  1         1  
  1         88  
7              
8             package Comics::Fetcher::Cascade;
9              
10             our $VERSION = "1.00";
11              
12             =head1 NAME
13              
14             Comics::Fetcher::Cascade -- Cascading url grabber
15              
16             =head1 SYNOPSIS
17              
18             package Comics::Plugin::Sigmund;
19             use parent qw(Comics::Fetcher::Cascade);
20              
21             our $name = "Sigmund";
22             our $url = "http://www.sigmund.nl/";
23             our @patterns = ( [ qr{ ... (?...) ... },
24             qr{ ... (?...) ... },
25             ...
26             qr{ ... (?...) ... } ],
27             );
28              
29             # Return the package name.
30             __PACKAGE__;
31              
32             =head1 DESCRIPTION
33              
34             The C Fetcher can use one or more patterns to determine the
35             URL of the desired image. If multiple patterns are supplied, each
36             pattern is applied to the fetched page and must define the url for the
37             next page as a named capture. The process is repeated, and the final
38             pattern has to provide the final url and image name.
39              
40             The Fetcher requires the common package variables:
41              
42             =over 8
43              
44             =item $name
45              
46             The full name of this comic, e.g. "Fokke en Sukke".
47              
48             =item $url
49              
50             The url of this comic's starting (i.e. home) page.
51              
52             =back
53              
54             Fetcher specific arguments:
55              
56             This Fetcher requires either C<$path> (direct URL fetch), C<$pattern>
57             (single fetch), or C<@patterns> (cascading fetch).
58              
59             =over 8
60              
61             =item $path
62              
63             The URL of the desired image.
64              
65             If I is not an absolute URL, it will be interpreted relative to
66             the I.
67              
68             =item $pattern
69              
70             A pattern to locate the image URL from the starting page.
71              
72             =item @patterns
73              
74             An array with patterns to locate the image URL.
75              
76             When a pattern matches, it must define the named capture C, which
77             points to the page to be loaded and used for the next pattern.
78              
79             =back
80              
81             Any of the patterns may additionally define:
82              
83             =over 8
84              
85             =item title
86              
87             The image title.
88              
89             =item alt
90              
91             The alternative text.
92              
93             =back
94              
95             =cut
96              
97 1     1   6 use parent qw(Comics::Fetcher::Base);
  1         2  
  1         6  
98              
99             sub fetch {
100 0     0 0   my ( $self, $reuse ) = @_;
101 0           my $state = $self->{state};
102 0   0       my $pats = $self->{patterns} || [ $self->{pattern} ];
103 0           my $name = $self->{name};
104 0           my $url = $self->{url};
105 0           my $tag = $self->{tag};
106 0           delete $state->{fail};
107              
108 0           my ( $image, $title, $alt ) = @_;
109              
110 0           my $referer = "comics.html";
111 0 0         if ( $self->{path} ) {
112 0           $url = $self->urlabs( $url, $self->{path} );
113             }
114             else {
115 0           my $pix = 0;
116 0           my $data;
117 0           foreach my $pat ( @$pats ) {
118 0           $pix++;
119 0           $data = "";
120 0           $state->{trying} = $url;
121              
122 0 0         if ( $reuse ) {
123 0           ::debug("Reusing page $pix $url");
124 0           $data = $self->load_html(".$tag.$pix.html");
125 0 0         $reuse = 0 unless $data;
126             }
127 0 0         unless ( $data ) {
128 0           ::debug("Fetching page $pix $url");
129 0           $::ua->default_header( Referer => $referer );
130 0           my $res = $::ua->get($url);
131 0 0         unless ( $res->is_success ) {
132 0 0         $self->{fail} = "Not found", return if $self->{optional};
133 0           die($res->status_line);
134             }
135 0           $data = $res->content;
136             }
137              
138 0 0         unless ( $data =~ $pat ) {
139 0 0         $self->{fail} = "No match", return if $self->{optional};
140             # Save a copy of the failed data.
141 0 0 0       $self->save_html( ".$tag.$pix.html", $data )
142             if ::debugging() && !$reuse;
143 0           die("FAIL: pattern $pix not found");
144             }
145              
146 1     1   1029 $url = $self->urlabs( $url, $+{url} );
  1         407  
  1         372  
  0            
147 0 0         unless ( $url ) {
148 0           die("FAIL: pattern $pix not found");
149             }
150              
151             # Other match data expected:
152 0 0         $title = $+{title} if $+{title};
153 0 0         $alt = $+{alt} if $+{alt};
154              
155 0           $referer = $url;
156             }
157              
158 0 0         unless ( $title ) {
159 0 0         $title = $1 if $data =~ /(.*?)<\/title>/; </td> </tr> <tr> <td class="h" > <a name="160">160</a> </td> <td class="c0" > <a href="#164"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="lib-Comics-Fetcher-Cascade-pm--condition.html#160-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $title ||= $name; </td> </tr> <tr> <td class="h" > <a name="161">161</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="162">162</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="163">163</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="164">164</a> </td> <td class="c0" > <a href="#165"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="lib-Comics-Fetcher-Cascade-pm--condition.html#164-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $alt ||= $tag; </td> </tr> <tr> <td class="h" > <a name="165">165</a> </td> <td class="c0" > <a href="#167"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="lib-Comics-Fetcher-Cascade-pm--condition.html#165-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $title ||= $name; </td> </tr> <tr> <td class="h" > <a name="166">166</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="167">167</a> </td> <td class="c0" > <a href="#168"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="lib-Comics-Fetcher-Cascade-pm--condition.html#167-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $etag = $state->{etag} || "None"; </td> </tr> <tr> <td class="h" > <a name="168">168</a> </td> <td class="c0" > <a href="#169"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $state->{trying} = $url; </td> </tr> <tr> <td class="h" > <a name="169">169</a> </td> <td class="c0" > <a href="#170"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ::debug("Fetching image $url (ETag: $etag)"); </td> </tr> <tr> <td class="h" > <a name="170">170</a> </td> <td class="c0" > <a href="#171"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $::ua->default_header( Referer => $referer ); </td> </tr> <tr> <td class="h" > <a name="171">171</a> </td> <td class="c0" > <a href="#172"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $::ua->default_header( "If-None-Match" => $etag ); </td> </tr> <tr> <td class="h" > <a name="172">172</a> </td> <td class="c0" > <a href="#173"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $res = $::ua->get($url); </td> </tr> <tr> <td class="h" > <a name="173">173</a> </td> <td class="c0" > <a href="#174"> 0 </a> </td> <td class="c0" > <a href="lib-Comics-Fetcher-Cascade-pm--branch.html#173-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> unless ( $res->is_success ) { </td> </tr> <tr> <td class="h" > <a name="174">174</a> </td> <td class="c0" > <a href="#175"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $state->{fail} = $res->status_line; </td> </tr> <tr> <td class="h" > <a name="175">175</a> </td> <td class="c0" > <a href="#176"> 0 </a> </td> <td class="c0" > <a href="lib-Comics-Fetcher-Cascade-pm--branch.html#175-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ( $state->{fail} =~ /304 Not Modified/ ) { </td> </tr> <tr> <td class="h" > <a name="176">176</a> </td> <td class="c0" > <a href="#177"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ::debug("Not fetching: Up to date $url"); </td> </tr> <tr> <td class="h" > <a name="177">177</a> </td> <td class="c0" > <a href="#178"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $::stats->{uptodate}++; </td> </tr> <tr> <td class="h" > <a name="178">178</a> </td> <td class="c0" > <a href="#179"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> delete( $state->{trying} ); </td> </tr> <tr> <td class="h" > <a name="179">179</a> </td> <td class="c0" > <a href="#180"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> delete( $state->{fail} ); </td> </tr> <tr> <td class="h" > <a name="180">180</a> </td> <td class="c0" > <a href="#182"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return $state; </td> </tr> <tr> <td class="h" > <a name="181">181</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="182">182</a> </td> <td class="c0" > <a href="#185"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> die("FAIL (image): ", $state->{fail}); </td> </tr> <tr> <td class="h" > <a name="183">183</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="184">184</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="185">185</a> </td> <td class="c0" > <a href="#186"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $data = $res->content; </td> </tr> <tr> <td class="h" > <a name="186">186</a> </td> <td class="c0" > <a href="#187"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $info; </td> </tr> <tr> <td class="h" > <a name="187">187</a> </td> <td class="c0" > <a href="#188"> 0 </a> </td> <td class="c0" > <a href="lib-Comics-Fetcher-Cascade-pm--branch.html#187-1"> 0 </a> </td> <td class="c0" > <a href="lib-Comics-Fetcher-Cascade-pm--condition.html#187-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ( !$data or !($info = Image::Info::image_info(\$data)) ) { </td> </tr> <tr> <td class="h" > <a name="188">188</a> </td> <td class="c0" > <a href="#190"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> die("FAIL: image no data"); </td> </tr> <tr> <td class="h" > <a name="189">189</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="190">190</a> </td> <td class="c0" > <a href="#191"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $state->{etag} = $res->header('etag'); </td> </tr> <tr> <td class="h" > <a name="191">191</a> </td> <td class="c0" > <a href="#192"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $md5 = Digest::MD5::md5_base64($data); </td> </tr> <tr> <td class="h" > <a name="192">192</a> </td> <td class="c0" > <a href="#193"> 0 </a> </td> <td class="c0" > <a href="lib-Comics-Fetcher-Cascade-pm--branch.html#192-1"> 0 </a> </td> <td class="c0" > <a href="lib-Comics-Fetcher-Cascade-pm--condition.html#192-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ( $state->{md5} and $state->{md5} eq $md5 ) { </td> </tr> <tr> <td class="h" > <a name="193">193</a> </td> <td class="c0" > <a href="#194"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ::debug("Fetching: Up to date $url"); </td> </tr> <tr> <td class="h" > <a name="194">194</a> </td> <td class="c0" > <a href="#195"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $::stats->{uptodate}++; </td> </tr> <tr> <td class="h" > <a name="195">195</a> </td> <td class="c0" > <a href="#196"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> delete( $state->{trying} ); </td> </tr> <tr> <td class="h" > <a name="196">196</a> </td> <td class="c0" > <a href="#199"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return $state; </td> </tr> <tr> <td class="h" > <a name="197">197</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="198">198</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="199">199</a> </td> <td class="c0" > <a href="#201"> 0 </a> </td> <td class="c0" > <a href="lib-Comics-Fetcher-Cascade-pm--branch.html#199-1"> 0 </a> </td> <td class="c0" > <a href="lib-Comics-Fetcher-Cascade-pm--condition.html#199-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ( $state->{c_img} </td> </tr> <tr> <td class="h" > <a name="200">200</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> and my $oldimg = $self->spoolfile( $state->{c_img} ) ) { </td> </tr> <tr> <td class="h" > <a name="201">201</a> </td> <td class="c0" > <a href="#205"> 0 </a> </td> <td class="c0" > <a href="lib-Comics-Fetcher-Cascade-pm--branch.html#201-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> unlink($oldimg) </td> </tr> <tr> <td class="h" > <a name="202">202</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> && ::debug("Removed: $oldimg"); </td> </tr> <tr> <td class="h" > <a name="203">203</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="204">204</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="205">205</a> </td> <td class="c0" > <a href="#207"> 0 </a> </td> <td class="c0" > <a href="lib-Comics-Fetcher-Cascade-pm--branch.html#205-1"> 0 </a> </td> <td class="c0" > <a href="lib-Comics-Fetcher-Cascade-pm--condition.html#205-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> unless ( $tag && $info->{file_ext} ) { </td> </tr> <tr> <td class="h" > <a name="206">206</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="lib-Comics-Fetcher-Cascade-pm--subroutine.html#206-1"> 1 </a> </td> <td >   </td> <td > 8 </td> <td class="s"> use Data::Dumper; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 5 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 321 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="207">207</a> </td> <td class="c0" > <a href="#210"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> warn($tag, ": ", Dumper($info)); </td> </tr> <tr> <td class="h" > <a name="208">208</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="209">209</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $img = sprintf( "%s-%06x.%s", $tag, </td> </tr> <tr> <td class="h" > <a name="210">210</a> </td> <td class="c0" > <a href="#211"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> int(rand(0x1000000)), $info->{file_ext} ); </td> </tr> <tr> <td class="h" > <a name="211">211</a> </td> <td class="c0" > <a href="#212"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $state->{c_width} = $info->{width}; </td> </tr> <tr> <td class="h" > <a name="212">212</a> </td> <td class="c0" > <a href="#214"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $state->{c_height} = $info->{height}; </td> </tr> <tr> <td class="h" > <a name="213">213</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="214">214</a> </td> <td class="c0" > <a href="#216"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->save_image( $img, \$data ); </td> </tr> <tr> <td class="h" > <a name="215">215</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="216">216</a> </td> <td class="c0" > <a href="#217"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $state->{update} = time; </td> </tr> <tr> <td class="h" > <a name="217">217</a> </td> <td class="c0" > <a href="#218"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $state->{md5} = $md5; </td> </tr> <tr> <td class="h" > <a name="218">218</a> </td> <td class="c0" > <a href="#220"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> delete( $state->{trying} ); </td> </tr> <tr> <td class="h" > <a name="219">219</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="220">220</a> </td> <td class="c0" > <a href="#221"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $state->{c_alt} = $alt; </td> </tr> <tr> <td class="h" > <a name="221">221</a> </td> <td class="c0" > <a href="#222"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $state->{c_title} = $title; </td> </tr> <tr> <td class="h" > <a name="222">222</a> </td> <td class="c0" > <a href="#224"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $state->{c_img} = $img; </td> </tr> <tr> <td class="h" > <a name="223">223</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="224">224</a> </td> <td class="c0" > <a href="#225"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $html = "$tag.html"; </td> </tr> <tr> <td class="h" > <a name="225">225</a> </td> <td class="c0" > <a href="#227"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->save_html($html); </td> </tr> <tr> <td class="h" > <a name="226">226</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="227">227</a> </td> <td class="c0" > <a href="#229"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $state->{url} = $url; </td> </tr> <tr> <td class="h" > <a name="228">228</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="229">229</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return 1; </td> </tr> <tr> <td class="h" > <a name="230">230</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="231">231</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="232">232</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 1; </td> </tr> </table> </body> </html>