RayWangQvQ / BiliBiliTool.Docs

BiliBiliTool的文档
MIT License
236 stars 310 forks source link

云函数412 请求被拦截 #42

Closed xiaoyichase closed 2 years ago

xiaoyichase commented 3 years ago

GET /xlive/web-interface/v1/second/getList?platform=web&parent_area_id=2&area_id=0&sort_type=&page=1 HTTP/1.1

Referer: https://live.bilibili.com/

Origin: https://live.bilibili.com

Host: api.live.bilibili.com

Accept: application/json, text/plain, /, application/json; q=0.001, application/xml; q=0.001

Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6

Sec-Fetch-Dest: empty

Sec-Fetch-Mode: cors

Sec-Fetch-Site: same-site

Connection: keep-alive

[RESPONSE]

HTTP/1.1 412 Precondition Failed

Date: Wed, 25 Aug 2021 18:51:44 GMT

Connection: keep-alive

Server: openresty

Content-Type: application/json

Content-Length: 61

{"code":-412,"message":"请求被拦截","ttl":1,"data":null}

[EXCEPTION]

WebApiClientCore.Exceptions.ApiResponseStatusException: 服务器响应了错误的http状态码:412 Precondition Failed

at WebApiClientCore.Attributes.ApiReturnAttribute.ValidateResponseStatusCode(HttpResponseMessage response)

at WebApiClientCore.Attributes.ApiReturnAttribute.ValidateResponseAsync(ApiResponseContext context)

at WebApiClientCore.Attributes.ApiReturnAttribute.OnResponseAsync(ApiResponseContext context)

at WebApiClientCore.Implementations.ApiRequestExecuter.HandleResponseAsync(ApiResponseContext context)

[ELAPSED] 00:00:23.1017467

❗ 程序发生异常:服务器响应了错误的http状态码:412 Precondition Failed

❗ 程序发生异常:服务器响应了错误的http状态码:412 Precondition Failed

⚠ 异常:System.Net.Http.HttpRequestException: 服务器响应了错误的http状态码:412 Precondition Failed

---> WebApiClientCore.Exceptions.ApiResponseStatusException: 服务器响应了错误的http状态码:412 Precondition Failed

at WebApiClientCore.Attributes.ApiReturnAttribute.ValidateResponseStatusCode(HttpResponseMessage response)

at WebApiClientCore.Attributes.ApiReturnAttribute.ValidateResponseAsync(ApiResponseContext context)

at WebApiClientCore.Attributes.ApiReturnAttribute.OnResponseAsync(ApiResponseContext context)

at WebApiClientCore.Implementations.ApiRequestExecuter.HandleResponseAsync(ApiResponseContext context)

at WebApiClientCore.Implementations.DefaultApiActionInvoker`1.InvokeAsync(ApiRequestContext request)

at WebApiClientCore.Implementations.DefaultApiActionInvoker`1.InvokeAsync(HttpClientContext context, Object[] arguments)

--- End of inner exception stack trace ---

at WebApiClientCore.Implementations.DefaultApiActionInvoker`1.InvokeAsync(HttpClientContext context, Object[] arguments)

at Ray.BiliBiliTool.DomainService.LiveDomainService.TianXuan() in /mnt/g/github/bilibilitool/src/Ray.BiliBiliTool.DomainService/LiveDomainService.cs:line 150

at Ray.BiliBiliTool.Application.LiveLotteryTaskAppService.LotteryTianXuan()

at Ray.BiliBiliTool.Application.LiveLotteryTaskAppService.DoTask()

at Ray.BiliBiliTool.Console.HostedServices.BiliBiliToolHostedService.DoTasks(String[] tasks) in /mnt/g/github/bilibilitool/src/Ray.BiliBiliTool.Console/HostedServices/BiliBiliToolHostedService.cs:line 91

at Ray.BiliBiliTool.Console.HostedServices.BiliBiliToolHostedService.StartAsync(CancellationToken cancellationToken) in /mnt/g/github/bilibilitool/src/Ray.BiliBiliTool.Console/HostedServices/BiliBiliToolHostedService.cs:line 52

RayWangQvQ commented 2 years ago

不是云函数的问题,是阿B返回的412,建议更新ck后重试下