* ignore video games

This commit is contained in:
Reinhard Pointner 2012-07-11 20:35:25 +00:00
parent d25bae2d42
commit 4b073df2d5
1 changed files with 4 additions and 0 deletions

View File

@ -94,6 +94,10 @@ public class IMDbClient implements MovieIdentificationService {
protected Movie scrapeMovie(Document dom) {
try {
String header = selectString("//H1", dom);
if (header.toUpperCase().contains("(VG)")) // ignore video games
return null;
String name = selectString("//H1/A/text()", dom);
String year = new Scanner(selectString("//H1/A/following::A/text()", dom)).useDelimiter("\\D+").next();
String url = selectString("//H1/A/@href", dom);