mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-23 08:18:52 -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));
|
||||
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())
|
||||
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
|
||||
public void getAkaMovieDescriptor() throws Exception {
|
||||
Movie movie = imdb.getMovieDescriptor(106559, Locale.ENGLISH);
|
||||
|
Loading…
Reference in New Issue
Block a user