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
 } else {
21
 } else {
22
 
22
 
23
   $data = json_encode(["method" => "gdata", "gidlist" => [[$gid, $token]], "namespace" => 1]);
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
   curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
25
   curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
26
   curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
26
   curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
27
   curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
27
   curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
63
   $cover = $json['thumb'];
63
   $cover = $json['thumb'];
64
   // and let's see if we can replace it with something better
64
   // and let's see if we can replace it with something better
65
   $gallery_page = file_get_contents($url);
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
   preg_match($re, $gallery_page, $galmatch);
67
   preg_match($re, $gallery_page, $galmatch);
68
   // were we able to find the first page of the gallery?
68
   // were we able to find the first page of the gallery?
69
   if ($galmatch[1]) {
69
   if ($galmatch[1]) {

Loading…
Cancel
Save