Giter Club home page Giter Club logo

Comments (11)

HFrost0 avatar HFrost0 commented on May 14, 2024

刚试了一下好像没遇上403,可能你的代理被限制了?如果你的浏览器进去,可以暂时通过直接提供m3u8链接的方式进行下载

selenuim太笨重太慢了,不到万不得已不会用的

from bilix.

HFrost0 avatar HFrost0 commented on May 14, 2024

我估计你可能问的是新的站点,PR中403出现的原因:

  1. 对于不支持http2协议的站点打开http2可能导致403
  2. 下载器没有import到__init__.py 导致实际上用的bilibili的downloader进行的请求

from bilix.

linbuxiao avatar linbuxiao commented on May 14, 2024

刚试了一下好像没遇上403,可能你的代理被限制了?如果你的浏览器进去,可以暂时通过直接提供m3u8链接的方式进行下载

selenuim太笨重太慢了,不到万不得已不会用的

不是新 PR,是已有的 jable 用例。如果你没有遇到那应该是我个人 ip 的问题。先关闭 issue。

from bilix.

Adam-Jin avatar Adam-Jin commented on May 14, 2024

对于返回403的问题,可能是cloudflare校验了TLS指纹,httpx换成curl_cffi可以正常请求。

from bilix.

linbuxiao avatar linbuxiao commented on May 14, 2024

对于返回403的问题,可能是cloudflare校验了TLS指纹,httpx换成curl_cffi可以正常请求。

这真的是一个神奇的库。

curl https://jable.tv/models/393ec3548aecc34004d54e03becd2ea9/
<!DOCTYPE html>
<html lang="en-US">
<head>
    <title>Just a moment...</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="robots" content="noindex,nofollow">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <link href="/cdn-cgi/styles/challenges.css" rel="stylesheet">

当我直接使用 curl 时,被 403 跳转,当然这可能是由于我代理的可用性问题。

于是我切换到了 curl-impersonate,也就是 @Adam-Jin 提到的依赖库。

docker run --rm lwthiker/curl-impersonate:0.5-chrome curl_chrome110 https://jable.tv/models/393ec3548aecc34004d54e03becd2ea9/
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0<!doctype html>
<html lang="en">
<head>
<title>佐久良咲希出演的AV在線看 - Jable.TV | 免費高清AV在線看 | J片 AV看到飽</title>

正常获取到了结果!这真是太厉害了。

目前我还在看库的实现方式,毕竟我对于 tls 指纹相关的知识了解的很少。

@HFrost0 你觉得需要 reopen 这个 issue 吗?

from bilix.

HFrost0 avatar HFrost0 commented on May 14, 2024

@linbuxiao 我也不了解这个,当时关闭这个问题的时候我还可以正常访问api,但是现在也403了,真的可以研究一下是怎么做的

from bilix.

linbuxiao avatar linbuxiao commented on May 14, 2024

image

目前这个 python 库 的实现好像有些不稳定,在 README 中说到打包方式有问题。所以可能会破坏原有功能的稳定性(当然我们可以先通过选项方式支持)。好消息是支持了异步。

from bilix.

linbuxiao avatar linbuxiao commented on May 14, 2024

jable 开启的 TLS 指纹检测 + http2 指纹检测目前没有更好地方式绕过,因为涉及到了 TLS 指纹加密套件修改,http2 连接模式,header 顺序修改。使用 curl-impersonate 是目前最好的方式。

目前通过编码形式绕过 cloudflare 墙的库有 golang 的 req,其中依赖了 utls。python 的实现方式大多为调用封装好的 curl 的 c 库来实现。

from bilix.

HFrost0 avatar HFrost0 commented on May 14, 2024

对于这个站点一个其他的解决办法,可以使用1.0版本的autov和浏览器脚本或selenium配合下载

from bilix.

linbuxiao avatar linbuxiao commented on May 14, 2024

对于这个站点一个其他的解决办法,可以使用1.0版本的autov和浏览器脚本或selenium配合下载

autov 是指?

from bilix.

HFrost0 avatar HFrost0 commented on May 14, 2024

@linbuxiao https://github.com/HFrost0/bilix/blob/1.0/bilix/download/auto_downloader.py

from bilix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.