From 9c39577f631f4158997e75275d4de600f13502f9 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sat, 1 Dec 2012 14:55:34 +0000 Subject: [PATCH] * update IMDb Scraper due to site changes --- source/net/sourceforge/filebot/web/IMDbClient.java | 2 +- test/net/sourceforge/filebot/web/IMDbClientTest.java | 12 +++++++++++- website/data/release-groups.txt | 6 +++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/source/net/sourceforge/filebot/web/IMDbClient.java b/source/net/sourceforge/filebot/web/IMDbClient.java index 8e632acb..9e74b955 100644 --- a/source/net/sourceforge/filebot/web/IMDbClient.java +++ b/source/net/sourceforge/filebot/web/IMDbClient.java @@ -75,7 +75,7 @@ public class IMDbClient implements MovieIdentificationService { Document dom = parsePage(new URL("http", host, "/find?s=tt&q=" + encode(query))); // select movie links followed by year in parenthesis - List nodes = selectNodes("//TABLE//A[substring-after(substring-before(following::text(),')'),'(')]", dom); + List nodes = selectNodes("//TABLE[@class='findList']//TD/A[substring-after(substring-before(following::text(),')'),'(')]", dom); List results = new ArrayList(nodes.size()); for (Node node : nodes) { diff --git a/test/net/sourceforge/filebot/web/IMDbClientTest.java b/test/net/sourceforge/filebot/web/IMDbClientTest.java index fa3ac978..0a1698f6 100644 --- a/test/net/sourceforge/filebot/web/IMDbClientTest.java +++ b/test/net/sourceforge/filebot/web/IMDbClientTest.java @@ -18,7 +18,6 @@ public class IMDbClientTest { @Test public void searchMovie() throws Exception { List results = imdb.searchMovie("Avatar", null); - Movie movie = results.get(0); assertEquals("Avatar", movie.getName()); @@ -27,6 +26,17 @@ public class IMDbClientTest { } + @Test + public void searchMovie2() throws Exception { + List results = imdb.searchMovie("Heat", null); + Movie movie = results.get(0); + + assertEquals("Heat", movie.getName()); + assertEquals(1995, movie.getYear()); + assertEquals(113277, movie.getImdbId(), 0); + } + + @Test public void searchMovieRedirect() throws Exception { List results = imdb.searchMovie("(500) Days of Summer (2009)", null); diff --git a/website/data/release-groups.txt b/website/data/release-groups.txt index ddc12d15..1473fada 100644 --- a/website/data/release-groups.txt +++ b/website/data/release-groups.txt @@ -242,6 +242,7 @@ CATCH catflap CBGB CCAT +CCS-Speed CDD CDDHD CENTi @@ -980,6 +981,8 @@ NhaNc3 NHD NHH NiBURU +NicoNico +NicoNicoDaoga NiF NightHawk NikonXP @@ -1045,7 +1048,7 @@ Osuald OUTDATED OUZO OYHD -OZC +OZC-EZ8 P0W4 P4DGE Pa@Ph @@ -1230,6 +1233,7 @@ SAMFD SANTI SAPHiRE Sapphire +SARS SaSHiMi SaSK0 SATANiC