Skip to content

Commit

Permalink
Set referer for Data18.
Browse files Browse the repository at this point in the history
 Sadly those are ignored for now by downloader...
  • Loading branch information
Wizell committed Mar 25, 2018
1 parent bb927b2 commit a44255d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -373,11 +374,11 @@ public ArrayList<Actor> 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));
Expand Down

0 comments on commit a44255d

Please sign in to comment.