Browse Source

I applied the wrong e-hentai API commits. Fix that

spaghetti 8 years ago
parent
commit
cdc9617f39
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      sections/ajax/doujin.php

+ 2
- 2
sections/ajax/doujin.php View File

@@ -21,7 +21,7 @@ if ($Cache->get_value('doujin_json_'.$gid)) {
21 21
 } else {
22 22
 
23 23
   $data = json_encode(["method" => "gdata", "gidlist" => [[$gid, $token]], "namespace" => 1]);
24
-  $curl = curl_init('http://e-hentai.org/api.php');
24
+  $curl = curl_init('http://api.e-hentai.org/api.php');
25 25
   curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
26 26
   curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
27 27
   curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
@@ -63,7 +63,7 @@ if ($Cache->get_value('doujin_json_'.$gid)) {
63 63
   $cover = $json['thumb'];
64 64
   // and let's see if we can replace it with something better
65 65
   $gallery_page = file_get_contents($url);
66
-  $re = '/'.preg_quote('"><img id="img" src="').'([^<]*)'.preg_quote('" style=').'/';
66
+  $re = '/'.preg_quote('-0px 0 no-repeat"><a href="').'(.*)'.preg_quote('"><img alt="01"').'/';
67 67
   preg_match($re, $gallery_page, $galmatch);
68 68
   // were we able to find the first page of the gallery?
69 69
   if ($galmatch[1]) {

Loading…
Cancel
Save