* updated TVDotComClient client because of site changes in the search result page
* resolve & in TVRage xml feed titles
This commit is contained in:
parent
64d8c3c2b4
commit
384e75576a
|
@ -61,7 +61,7 @@ public class TVDotComClient implements EpisodeListClient {
|
||||||
|
|
||||||
Document dom = getHtmlDocument(searchUrl);
|
Document dom = getHtmlDocument(searchUrl);
|
||||||
|
|
||||||
List<Node> nodes = selectNodes("//H3[@class='title']/A", dom);
|
List<Node> nodes = selectNodes("//*[@class='title']//descendant-or-self::A", dom);
|
||||||
|
|
||||||
List<SearchResult> searchResults = new ArrayList<SearchResult>(nodes.size());
|
List<SearchResult> searchResults = new ArrayList<SearchResult>(nodes.size());
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ public class TVDotComClient implements EpisodeListClient {
|
||||||
|
|
||||||
searchResults.add(new HyperLink(title, episodeListingUrl));
|
searchResults.add(new HyperLink(title, episodeListingUrl));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.getLogger("global").log(Level.WARNING, "Invalid href: " + href, e);
|
Logger.getLogger(getClass().getName()).log(Level.WARNING, "Invalid href: " + href, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ public class TVRageClient implements EpisodeListClient {
|
||||||
List<Episode> episodes = new ArrayList<Episode>(nodes.size());
|
List<Episode> episodes = new ArrayList<Episode>(nodes.size());
|
||||||
|
|
||||||
for (Node node : nodes) {
|
for (Node node : nodes) {
|
||||||
String title = getTextContent("title", node);
|
String title = getTextContent("title", node).replace("&", "&");
|
||||||
String episodeNumber = getTextContent("seasonnum", node);
|
String episodeNumber = getTextContent("seasonnum", node);
|
||||||
String seasonNumber = node.getParentNode().getAttributes().getNamedItem("no").getTextContent();
|
String seasonNumber = node.getParentNode().getAttributes().getNamedItem("no").getTextContent();
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ public class TVRageClient implements EpisodeListClient {
|
||||||
maxSeason = seasonNumber;
|
maxSeason = seasonNumber;
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
Logger.getLogger("global").log(Level.WARNING, "Illegal season number", e);
|
Logger.getLogger(getClass().getName()).log(Level.WARNING, "Illegal season number", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue