E-Viewer icon indicating copy to clipboard operation
E-Viewer copied to clipboard

无法加载图库中某些图的大图

Open wfjsw opened this issue 2 years ago • 2 comments

版本:2022.1.3 图库链接:https://e-hentai.org/s/1e9917b1e7/2006325-11

Newtonsoft.Json.JsonReaderException
  HResult=0x80131500
  Message=Could not convert string to integer: WZB. Path 'si', line 1, position 2090.
  Source=Newtonsoft.Json
  StackTrace:
   在 Newtonsoft.Json.JsonReader.ReadInt32String(String s)
   在 Newtonsoft.Json.JsonTextReader.FinishReadQuotedNumber(ReadType readType)
   在 Newtonsoft.Json.JsonTextReader.ReadAsInt32()
   在 Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
   在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   在 Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   在 Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   在 Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   在 ExClient.Api.ApiRequest`1.<GetResponseAsync>d__0.MoveNext() 在 D:\code\E-Viewer\ExClient\Api\ApiRequest.cs 中: 第 74 行

  此异常最初是在此调用堆栈中引发的: 
    Newtonsoft.Json.JsonReader.ReadInt32String(string)
    Newtonsoft.Json.JsonTextReader.FinishReadQuotedNumber(Newtonsoft.Json.ReadType)
    Newtonsoft.Json.JsonTextReader.ReadAsInt32()
    Newtonsoft.Json.JsonReader.ReadForType(Newtonsoft.Json.Serialization.JsonContract, bool)
    Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(object, Newtonsoft.Json.JsonReader, Newtonsoft.Json.Serialization.JsonObjectContract, Newtonsoft.Json.Serialization.JsonProperty, string)
    Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(Newtonsoft.Json.JsonReader, System.Type, Newtonsoft.Json.Serialization.JsonContract, Newtonsoft.Json.Serialization.JsonProperty, Newtonsoft.Json.Serialization.JsonContainerContract, Newtonsoft.Json.Serialization.JsonProperty, object)
    Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(Newtonsoft.Json.JsonReader, System.Type, Newtonsoft.Json.Serialization.JsonContract, Newtonsoft.Json.Serialization.JsonProperty, Newtonsoft.Json.Serialization.JsonContainerContract, Newtonsoft.Json.Serialization.JsonProperty, object)
    Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(Newtonsoft.Json.JsonReader, System.Type, bool)
    Newtonsoft.Json.JsonSerializer.DeserializeInternal(Newtonsoft.Json.JsonReader, System.Type)
    Newtonsoft.Json.JsonConvert.DeserializeObject(string, System.Type, Newtonsoft.Json.JsonSerializerSettings)
    ...
    [调用堆栈已截断]

导致异常的结构:ExClient.Api.ImageDataResponse

导致异常的 JSON:

{
    "p": 11,
    "s": "s/1e9917b1e7/2006325-11",
    "n": "<div class=\"sn\"><a onclick=\"return load_image(1, '8568373905')\" href=\"https://e-hentai.org/s/8568373905/2006325-1\"><img src=\"https://ehgt.org/g/f.png\" /></a><a id=\"prev\" onclick=\"return load_image(10, 'a33ef5e87d')\" href=\"https://e-hentai.org/s/a33ef5e87d/2006325-10\"><img src=\"https://ehgt.org/g/p.png\" /></a><div><span>11</span> / <span>66</span></div><a id=\"next\" onclick=\"return load_image(12, '207b5d966f')\" href=\"https://e-hentai.org/s/207b5d966f/2006325-12\"><img src=\"https://ehgt.org/g/n.png\" /></a><a onclick=\"return load_image(66, '14f9d9d983')\" href=\"https://e-hentai.org/s/14f9d9d983/2006325-66\"><img src=\"https://ehgt.org/g/l.png\" /></a></div>",
    "i": "<div>11.jpg :: 1600 x 2263</div>",
    "k": "1e9917b1e7",
    "i3": "<a onclick=\"return load_image(12, '207b5d966f')\" href=\"https://e-hentai.org/s/207b5d966f/2006325-12\"><img id=\"img\" src=\"https://hacaqjfrpvthigkeomjq.hath.network/om/97494114/1e9917b1e7592d0d7812feda6fd765221eefb70e-10376837-2894-4093-png/x/1600/qsqd6zmhe9jvvhn87v/11.jpg\" style=\"height:2263px;width:1600px\" onerror=\"this.onerror=null; nl('WZB-456951')\" /></a>",
    "i5": "<div class=\"sb\"><a href=\"https://e-hentai.org/g/2006325/cb1993d325/\"><img src=\"https://ehgt.org/g/b.png\" referrerpolicy=\"no-referrer\" /></a></div>",
    "i6": " &nbsp; <img src=\"https://ehgt.org/g/mr.gif\" class=\"mr\" /> <a href=\"https://e-hentai.org/?f_shash=1e9917b1e7592d0d7812feda6fd765221eefb70e&amp;fs_from=11.jpg+from+%5Btksand%5D+Kokoro-chan+to...+%28Touhou+Project%29\">Show all galleries with this file</a>  &nbsp; <img src=\"https://ehgt.org/g/mr.gif\" class=\"mr\" /> <a href=\"#\" id=\"loadfail\" onclick=\"return nl('WZB-456951')\">Click here if the image fails loading</a> ",
    "i7": " &nbsp; <img src=\"https://ehgt.org/g/mr.gif\" class=\"mr\" /> <a href=\"https://e-hentai.org/fullimg.php?gid=2006325&amp;page=11&amp;key=v8wvplh9sl3\">Download original 2894 x 4093 9.90 MB source</a>",
    "si": "WZB",
    "x": 1600,
    "y": 2263
}

wfjsw avatar Feb 16 '22 15:02 wfjsw

https://github.com/OpportunityLiu/E-Viewer/blob/1badaf4d90b4ecf9fa6bd805e805af3fd9d92b34/ExClient/Api/ImageData.cs#L51 换成 string 之后就好了。不知道会不会有什么暗病。

wfjsw avatar Feb 17 '22 19:02 wfjsw

但是现在去访问又变成 int 了,感觉跟缓存啥的有关

OpportunityLiu avatar Jun 23 '22 13:06 OpportunityLiu