* ignore video games
This commit is contained in:
parent
d25bae2d42
commit
4b073df2d5
@ -94,6 +94,10 @@ public class IMDbClient implements MovieIdentificationService {
|
|||||||
|
|
||||||
protected Movie scrapeMovie(Document dom) {
|
protected Movie scrapeMovie(Document dom) {
|
||||||
try {
|
try {
|
||||||
|
String header = selectString("//H1", dom);
|
||||||
|
if (header.toUpperCase().contains("(VG)")) // ignore video games
|
||||||
|
return null;
|
||||||
|
|
||||||
String name = selectString("//H1/A/text()", dom);
|
String name = selectString("//H1/A/text()", dom);
|
||||||
String year = new Scanner(selectString("//H1/A/following::A/text()", dom)).useDelimiter("\\D+").next();
|
String year = new Scanner(selectString("//H1/A/following::A/text()", dom)).useDelimiter("\\D+").next();
|
||||||
String url = selectString("//H1/A/@href", dom);
|
String url = selectString("//H1/A/@href", dom);
|
||||||
|
Loading…
Reference in New Issue
Block a user