* don't scrape tv shows / video games / etc as movie

This commit is contained in:
Reinhard Pointner 2012-02-18 09:49:57 +00:00
parent 3c8d6b5395
commit b1090606a4
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ public class IMDbClient implements MovieIdentificationService {
String year = node.getNextSibling().getTextContent().replaceAll("[\\p{Punct}\\p{Space}]+", ""); // remove non-number characters
String href = getAttribute("href", node);
results.add(new Movie(name, Pattern.matches("\\d{4}", year) ? Integer.parseInt(year) : -1, getImdbId(href)));
results.add(new Movie(name, Integer.parseInt(year), getImdbId(href)));
} catch (Exception e) {
// ignore illegal movies (TV Shows, Videos, Video Games, etc)
}