david082321 / biliroaming-php-server Goto Github PK
View Code? Open in Web Editor NEW自建哔哩漫游解析服务器(PHP)
License: GNU General Public License v3.0
自建哔哩漫游解析服务器(PHP)
License: GNU General Public License v3.0
// 自定义API,避免集中请求,降低风控几率
$hk_api = array('host1','host2','host3'); // 随机调用HK,可以自定义其他反代api,例如云函数、CFW,请自行修改 host13 的內容,启用要注释上方默认api3 的內容,启用要注释上方默认api
$tw_api = array('host1','host2','host3'); // 随机调用TW,可以自定义其他反代api,例如云函数、CFW,请自行修改 host1
if (CUSTOM_HOST_HK == "CUSTOM_HOST_HK") {
define('CUSTOM_HOST_HK', $hk_api[array_rand($hk_api)]); // 随机调用HK
}
if (CUSTOM_HOST_TW == "CUSTOM_HOST_TW") {
define('CUSTOM_HOST_TW', $tw_api[array_rand($tw_api)]); // 随机调用TW
}
如果注释掉上方的默认API则下面的if判断会丢失掉赋值
所以要怎么搞?
当启用缓存时会因无法访问数据库而解析失败
以下是由 nginx 托管的报错信息
2024/04/20 18:58:46 [error] 105474#105474: *2240 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to a member function query() on string in /opt/BiliRoaming-PHP-Server/utils/functio
ns_cache.php:67
Stack trace:
#0 /opt/BiliRoaming-PHP-Server/utils/auth.php(8): get_userinfo_fromsql()
#1 /opt/BiliRoaming-PHP-Server/intl/gateway/v2/ogv/playurl/index.php(21): include('/opt/BiliRoamin...')
#2 {main}
如题
这两天从原来的top渔民换到了cn域名,结果现在进番速度大降
甚至不做伪静态的话根本看不了,做伪静态也只会特别特别慢,原来都是秒进的
想问问有可能是哪方面的问题
电报我前段时间莫名被永封了,所以不能在群里发,所以在这里issue了
Linux (debian 11)如何通过docker部署漫游
无脑直接复制粘贴
curl -fsSL https://get.docker.com | bash -s docker
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker run -d --name web -p 8080:80 -v /root/php:/var/www/html php:7.2-apache
cd /root/php
unzip Server_v4.5.3.zip
至此你应该可以用。 ip:8080。 ip加端口的方式访问
给你的ip解析一个域名。比如xxx.xxx.com
继续
通过这个链接里的教程
https://blog.xiaoz.org/archives/18963
开启代理 以及申请ssl证书。自此应该就没问题
如题. 这样服务器可靠性大大提高, 而且成本也比购买服务器低. 自建难度也大大降低.
我不会php, 所以问一下. 或者等暑假有空了我自己写一个python或者nodejs版本的.
不过已知数据库的问题有点难解决, 云函数不允许写数据到本地, 数据存储的问题我在移植FODI项目的时候是通过API连接到Cloudflare Worker KV曲线解决的
拉取了最新的版本 (afea6b9) 部署在服务器的宝塔面板上,已配置防重复 301 转址
Web 端油猴脚本和 App 端哔哩漫游都填好了服务器的域名
App 端打开番剧一切正常,Web 端首次打开番剧会弹出一大串东西,必须多刷新一次才能看
不确定是油猴脚本的问题还是程序的问题
如果去掉防重复 301 转址后直接不能看了
服务器环境:
Ubuntu 20.04.5
Nginx 1.23.2
MySQL 5.7.40
PHP 8.2.0
程序配置:
(和拉取的 config.php 不同的地方)
BLOCK_TYPE
= local_whitelist
NEED_LOGIN
= 1
BILIROAMING
= 0
WEB_ON
= 1
SAVE_CACHE
= 1
SAVE_LOG
= 1
最近在看AppEnv-Kotlin 遇到一些问题,特意来请教你
我的mysql版本为8.0.34,会提示连接数据库失败,此外无任何错误提示
PHP版本8.2.12
网页服务器Microsoft-IIS
能否自定义黑名单返回视频呢?谢谢
可采用https://api.bilibili.com/pgc/web/season/section?season_id=
例如
season_id:45838 为天宫赐福第二季
可直接找到相关的正片和PV等
即https://www.bilibili.com/bangumi/media/md20340706/
中的作品详情中的正片和PV花絮
为了避免格式问题,找到间谍过家家为例
即https://www.bilibili.com/bangumi/media/md28237178
进行比对,可见依旧完结的番剧中格式也没有明显变化,即为固定格式
如何查找season_id?
可在https://www.bilibili.com/bangumi/media/md28237178
中使用F12中的网络项
查询https://api.bilibili.com/pgc/web/season
即可找到
https://api.bilibili.com/pgc/web/season?season_id=xxxxxx
function getEpidList($url) {
// 获取JSON数据
$jsonData = file_get_contents($url);
// 将JSON数据解码为关联数组
$data = json_decode($jsonData, true);
// 如果 json中的code为-404 则返回null
if ($data['code'] == -404) {
return null;
}
if ($data !== null) {
$epids = array();
// 处理主要节目即正片(main_section)的剧集
foreach ($data['result']['main_section']['episodes'] as $episode) {
$share_url = $episode['share_url'];
// 使用正则表达式从分享链接中提取EPID
if (preg_match('/ep(\d+)/', $share_url, $matches)) {
$epid = $matches[1];
$epids[] = $epid;
}
}
// 处理其他节目部分即PV或者其他
foreach ($data['result']['section'] as $section) {
foreach ($section['episodes'] as $episode) {
$share_url = $episode['share_url'];
// 使用正则表达式从分享链接中提取EPID
if (preg_match('/ep(\d+)/', $share_url, $matches)) {
$epid = $matches[1];
$epids[] = $epid;
}
}
}
return $epids;
} else {
return null;
}
}
$url = 'https://api.bilibili.com/pgc/web/season/section?season_id=' . $season_id;
$epid_list = getEpidList($url);
is edit
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.