* only accept proper Movies or TV Shows

This commit is contained in:
Reinhard Pointner 2012-07-18 09:50:39 +00:00
parent 5379c39be3
commit 0a4b68f289
1 changed files with 2 additions and 2 deletions

View File

@ -95,8 +95,8 @@ public class IMDbClient implements MovieIdentificationService {
protected Movie scrapeMovie(Document dom) { protected Movie scrapeMovie(Document dom) {
try { try {
String header = selectString("//H1", dom); String header = selectString("//H1", dom).toUpperCase();
if (header.toUpperCase().contains("(VG)")) // ignore video games if (header.contains("(VG)") || header.contains("(V)")) // ignore video games and videos
return null; return null;
String name = selectString("//H1/A/text()", dom).replaceAll("\\s+", " ").trim(); String name = selectString("//H1/A/text()", dom).replaceAll("\\s+", " ").trim();