* fixed leading "recap" in episodes titles of recap episodes

This commit is contained in:
Reinhard Pointner 2009-05-25 20:30:32 +00:00
parent ec4254e687
commit 508c9a7d93
2 changed files with 9 additions and 3 deletions

View File

@ -131,13 +131,13 @@ public class AnidbClient implements EpisodeListProvider {
List<Node> nodes = selectNodes("id('eplist')//TR/TD/SPAN/ancestor::TR", dom); List<Node> nodes = selectNodes("id('eplist')//TR/TD/SPAN/ancestor::TR", dom);
ArrayList<Episode> episodes = new ArrayList<Episode>(nodes.size()); List<Episode> episodes = new ArrayList<Episode>(nodes.size());
for (Node node : nodes) { for (Node node : nodes) {
List<Node> columns = getChildren("TD", node); List<Node> columns = getChildren("TD", node);
String number = columns.get(0).getTextContent().trim(); String number = getTextContent("A", columns.get(0));
String title = columns.get(1).getTextContent().trim(); String title = getTextContent("LABEL", columns.get(1));
// if number does not match, episode is probably some kind of special (S1, S2, ...) // if number does not match, episode is probably some kind of special (S1, S2, ...)
if (number.matches("\\d+")) { if (number.matches("\\d+")) {

View File

@ -117,6 +117,12 @@ public class AnidbClientTest {
} }
@Test
public void getEpisodeListTrimRecap() throws Exception {
assertEquals("Sea God of the East, Azure Sea of the West - Transition Chapter", anidb.getEpisodeList(twelvekingdomsSearchResult).get(44).getTitle());
}
@Test @Test
public void selectTitle() throws Exception { public void selectTitle() throws Exception {
// use official english title // use official english title