mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-16 06:15:02 -05:00
* various improvements to TVdotcom, Anidb and TVRage clients
This commit is contained in:
parent
6bcff92763
commit
b0b3c0f48d
@ -78,7 +78,7 @@ public class AnidbClient extends EpisodeListClient {
|
|||||||
|
|
||||||
if (!list.isEmpty()) {
|
if (!list.isEmpty()) {
|
||||||
// get show's name from the document
|
// get show's name from the document
|
||||||
String header = XPathUtil.selectString("//DIV[@id='layout-content']//H1[1]", dom);
|
String header = XPathUtil.selectString("id('layout-content')//H1[1]", dom);
|
||||||
String title = header.replaceFirst("Anime:\\s*", "");
|
String title = header.replaceFirst("Anime:\\s*", "");
|
||||||
|
|
||||||
searchResults.put(title, getSearchUrl(searchterm));
|
searchResults.put(title, getSearchUrl(searchterm));
|
||||||
@ -98,7 +98,7 @@ public class AnidbClient extends EpisodeListClient {
|
|||||||
|
|
||||||
Document dom = HtmlUtil.getHtmlDocument(getEpisodeListUrl(showname, season));
|
Document dom = HtmlUtil.getHtmlDocument(getEpisodeListUrl(showname, season));
|
||||||
|
|
||||||
List<Node> nodes = XPathUtil.selectNodes("//TABLE[@id='eplist']//TR/TD/SPAN/ancestor::TR", dom);
|
List<Node> nodes = XPathUtil.selectNodes("id('eplist')//TR/TD/SPAN/ancestor::TR", dom);
|
||||||
|
|
||||||
ArrayList<Episode> list = new ArrayList<Episode>(nodes.size());
|
ArrayList<Episode> list = new ArrayList<Episode>(nodes.size());
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ public class TVRageClient extends EpisodeListClient {
|
|||||||
|
|
||||||
Document dom = HtmlUtil.getHtmlDocument(getSearchUrl(searchterm));
|
Document dom = HtmlUtil.getHtmlDocument(getSearchUrl(searchterm));
|
||||||
|
|
||||||
List<Node> nodes = XPathUtil.selectNodes("id('search_begin')//TABLE[1]/*/TR/TD/A[1]", dom);
|
List<Node> nodes = XPathUtil.selectNodes("id('search_begin')/TABLE[1]/*/TR/TD/A[1]", dom);
|
||||||
|
|
||||||
LinkedHashMap<String, URL> searchResults = new LinkedHashMap<String, URL>(nodes.size());
|
LinkedHashMap<String, URL> searchResults = new LinkedHashMap<String, URL>(nodes.size());
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ public class TVRageClient extends EpisodeListClient {
|
|||||||
|
|
||||||
for (Node node : nodes) {
|
for (Node node : nodes) {
|
||||||
String seasonAndEpisodeNumber = XPathUtil.selectString("./TD[2]/A", node);
|
String seasonAndEpisodeNumber = XPathUtil.selectString("./TD[2]/A", node);
|
||||||
String title = XPathUtil.selectString("./TD[5]/A", node);
|
String title = XPathUtil.selectString("./TD[5]", node);
|
||||||
|
|
||||||
List<Node> precedings = XPathUtil.selectNodes("../preceding-sibling::TABLE", node);
|
List<Node> precedings = XPathUtil.selectNodes("../preceding-sibling::TABLE", node);
|
||||||
Node previousTable = precedings.get(precedings.size() - 1);
|
Node previousTable = precedings.get(precedings.size() - 1);
|
||||||
|
@ -82,7 +82,7 @@ public class TvdotcomClient extends EpisodeListClient {
|
|||||||
|
|
||||||
Document dom = HtmlUtil.getHtmlDocument(getEpisodeListUrl(showname, season));
|
Document dom = HtmlUtil.getHtmlDocument(getEpisodeListUrl(showname, season));
|
||||||
|
|
||||||
List<Node> nodes = XPathUtil.selectNodes("//DIV[@id='episode-listing']/DIV/TABLE/TR/TD/ancestor::TR", dom);
|
List<Node> nodes = XPathUtil.selectNodes("id('episode-listing')/DIV/TABLE/TR/TD/ancestor::TR", dom);
|
||||||
|
|
||||||
String seasonString = null;
|
String seasonString = null;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user