mirror of
https://github.com/mitb-archive/filebot
synced 2025-01-11 05:48:01 -05:00
* fix video support in imdb scraper
This commit is contained in:
parent
46de54e213
commit
de9d326eb0
@ -112,7 +112,7 @@ public class IMDbClient implements MovieIdentificationService {
|
|||||||
int imdbid = getImdbId(selectString("//LINK[@rel='canonical']/@href", dom));
|
int imdbid = getImdbId(selectString("//LINK[@rel='canonical']/@href", dom));
|
||||||
String title = selectString("//META[@property='og:title']/@content", dom);
|
String title = selectString("//META[@property='og:title']/@content", dom);
|
||||||
|
|
||||||
Matcher titleMatcher = Pattern.compile("(.+)\\s\\((?i:TV\\s)?(\\d{4})\\)$").matcher(title);
|
Matcher titleMatcher = Pattern.compile("(.+)\\s\\((?i:tv.|video.)?(\\d{4})\\)$").matcher(title);
|
||||||
if (!titleMatcher.matches())
|
if (!titleMatcher.matches())
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
@ -133,6 +133,16 @@ public class IMDbClientTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void getMovieDescriptor5() throws Exception {
|
||||||
|
Movie movie = imdb.getMovieDescriptor(1020960, null);
|
||||||
|
|
||||||
|
assertEquals("God, the Universe and Everything Else", movie.getName());
|
||||||
|
assertEquals(1988, movie.getYear());
|
||||||
|
assertEquals(1020960, movie.getImdbId(), 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getAkaMovieDescriptor() throws Exception {
|
public void getAkaMovieDescriptor() throws Exception {
|
||||||
Movie movie = imdb.getMovieDescriptor(106559, Locale.ENGLISH);
|
Movie movie = imdb.getMovieDescriptor(106559, Locale.ENGLISH);
|
||||||
|
Loading…
Reference in New Issue
Block a user