* only accept proper Movies or TV Shows
This commit is contained in:
parent
5379c39be3
commit
0a4b68f289
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue