From a44255df4aad1f616d6eca71e7b4035557b6f825 Mon Sep 17 00:00:00 2001 From: Wizell Date: Sun, 25 Mar 2018 15:45:41 +0200 Subject: [PATCH] Set referer for Data18. Sadly those are ignored for now by downloader... --- .../specific/Data18MovieParsingProfile.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/moviescraper/doctord/controller/siteparsingprofile/specific/Data18MovieParsingProfile.java b/src/main/java/moviescraper/doctord/controller/siteparsingprofile/specific/Data18MovieParsingProfile.java index 9393d88a..53e86af6 100644 --- a/src/main/java/moviescraper/doctord/controller/siteparsingprofile/specific/Data18MovieParsingProfile.java +++ b/src/main/java/moviescraper/doctord/controller/siteparsingprofile/specific/Data18MovieParsingProfile.java @@ -188,6 +188,7 @@ public Thumb[] scrapePosters() { Thumb[] posterThumbs = new Thumb[1]; try { posterThumbs[0] = new Thumb(fixIPAddressOfData18(posterElement.attr("src"))); + posterThumbs[0].setViewerURL(posterThumbs[0].getThumbURL()); return posterThumbs; } catch (MalformedURLException e) { e.printStackTrace(); @@ -373,11 +374,11 @@ public ArrayList scrapeActors() { String actorThumbnailURL = currentActorElement.attr("src"); //case with actor with thumbnail - if (actorThumbnailURL != null && !actorThumbnailURL.equals("http://img.data18.com/images/no_prev_60.gif")) { + if (actorThumbnailURL != null && !actorThumbnailURL.endsWith("no_prev_60.gif")) { try { actorThumbnailURL = actorThumbnailURL.replaceFirst(Pattern.quote("/60/"), "/120/"); Thumb actorThumbnail = new Thumb(actorThumbnailURL); - actorThumbnail.setViewerURL(new URL("http://data18.com")); + actorThumbnail.setViewerURL(new URL(actorThumbnailURL)); actorList.add(new Actor(actorName, null, actorThumbnail)); } catch (MalformedURLException e) { actorList.add(new Actor(actorName, null, null));