mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-23 16:28:51 -05:00
* update IMDb Scraper due to site changes
This commit is contained in:
parent
d11ea6a4b2
commit
9c39577f63
@ -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<Node> nodes = selectNodes("//TABLE//A[substring-after(substring-before(following::text(),')'),'(')]", dom);
|
||||
List<Node> nodes = selectNodes("//TABLE[@class='findList']//TD/A[substring-after(substring-before(following::text(),')'),'(')]", dom);
|
||||
List<Movie> results = new ArrayList<Movie>(nodes.size());
|
||||
|
||||
for (Node node : nodes) {
|
||||
|
@ -18,7 +18,6 @@ public class IMDbClientTest {
|
||||
@Test
|
||||
public void searchMovie() throws Exception {
|
||||
List<Movie> 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<Movie> 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<Movie> results = imdb.searchMovie("(500) Days of Summer (2009)", null);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user