Skip to content

Commit

Permalink
update v2.25.0
Browse files Browse the repository at this point in the history
update v2.25.0
  • Loading branch information
nICEnnnnnnnLee authored Feb 22, 2023
2 parents 342fcca + 981ba4e commit e0706c1
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 56 deletions.
6 changes: 3 additions & 3 deletions .github/release.info
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
* 修复[#105](https://github.com/nICEnnnnnnnLee/BilibiliLiveRecorder/issues/105),[#102](https://github.com/nICEnnnnnnnLee/BilibiliLiveRecorder/issues/105) `douyin`正则匹配修复
* 修复快手录制
* 优化:去除解析器里面的`System.exit`使用
* 修复: 抖音直播`liver=douyin2`
* 修复[#113](https://github.com/nICEnnnnnnnLee/BilibiliLiveRecorder/issues/113): 虎牙从网页里面抠的内容有延迟,主播下播后可能误认为仍在直播。为此,获取直播链接后增加有效性检查。
* 新增[#5](https://github.com/nICEnnnnnnnLee/BilibiliLiveRecorder/issues/5) : 尝试使用另一种方式获取虎牙直播信息,该方式没有延迟。 `liver=huya2`
4 changes: 2 additions & 2 deletions .github/release.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"tag_main": "2.24.0",
"tag_latest": "2.24.0"
"tag_main": "2.25.0",
"tag_latest": "2.25.0"
}
11 changes: 9 additions & 2 deletions .github/workflows/pre-release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,23 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'

- name: Read tag_main
id: tag_main
uses: ashley-taylor/[email protected]
with:
path: ./.github/release.json
property: tag_main

- name: Read tag_latest
id: tag_latest
uses: ashley-taylor/read-json-property-action@v1.0
uses: ashley-taylor/read-json-property-action@v1.1
with:
path: ./.github/release.json
property: tag_latest
Expand Down
41 changes: 12 additions & 29 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,27 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 1.8
distribution: 'temurin'
java-version: '8'

- name: Read tag_main
id: tag_main
uses: ashley-taylor/read-json-property-action@v1.0
uses: ashley-taylor/read-json-property-action@v1.1
with:
path: ./.github/release.json
property: tag_main

- name: Read tag_latest
id: tag_latest
uses: ashley-taylor/read-json-property-action@v1.0
uses: ashley-taylor/read-json-property-action@v1.1
with:
path: ./.github/release.json
property: tag_latest

- name: Read description
id: description
uses: juliangruber/read-file-action@v1
with:
path: ./.github/release.info

- name: MVN Package
run: |
mvn -B package assembly:single --file pom.xml -Dmaven.test.skip=true
Expand Down Expand Up @@ -87,25 +82,13 @@ jobs:
zip -rm BilibiliLiveRecord\ v${{steps.tag_latest.outputs.value}}.zip ./LICENSE/
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
uses: softprops/action-gh-release@v1
with:
tag_name: V${{steps.tag_latest.outputs.value}}
release_name: BiliLiveRecorder - v${{steps.tag_latest.outputs.value}}
body: |
${{steps.description.outputs.content}}
name: BiliLiveRecorder - v${{steps.tag_latest.outputs.value}}
body_path: ./.github/release.info
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./BilibiliLiveRecord v${{steps.tag_latest.outputs.value}}.zip
asset_name: BilibiliLiveRecord.v${{steps.tag_latest.outputs.value}}.zip
asset_content_type: application/zip
files: |
BilibiliLiveRecord.v${{steps.tag_latest.outputs.value}}.zip
28 changes: 18 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ Go go go, Bilibili Pikachu!
## :smile:使用方法
+ 程序调用时传入参数即可(顺序可变)
`java -Dfile.encoding=utf-8 -jar BiliLiveRecorder.jar "debug=false&check=false&delete=false&liver=douyu&id=233233&qn=0&retry=5"`
+ 各参数意义

<details>
<summary>各参数意义 </summary>


| Key | 必选 | 释义 |
| ------------- | ------------- | ------------- |
Expand Down Expand Up @@ -62,22 +65,26 @@ Go go go, Bilibili Pikachu!
| retryAfterMinutes || 当目标不在直播时,每次获取直播间信息的时间间隔,单位分钟。默认`5.0` |
| failRetryAfterMinutes || 当连接出现异常时,下次尝试录制的时间间隔,单位分钟。默认`1.0` |
| plugin || 插件功能,允许用户自定义某些操作。默认false |
</details>

<details>
<summary>各直播源解析情况 </summary>

+ 各直播源解析情况

| liver | 最后测试时间 | 备注 |
| ------------- | ------------- | ------------- |
| douyu | 2023/01/07 | `flv`清晰度可多选,但部分高清需要cookie |
| kuaishou | 2023/01/07 | `flv`清晰度可多选,必须要cookie(可以不登录,只需要过了拖拽验证即可) |
| douyin | 2023/01/07 | `flv`清晰度可多选,必须要cookie(可以不登录,只需要过了拖拽验证即可)。id为`https://live.douyin.com/1234567`后面的那串数字,也可以直接输入短网址类型`https://v.douyin.com/xxxx` |
| douyin2 | 2023/01/07 | 抖音的另一种解析方式,前者失败后可以尝试。`flv`清晰度可多选,必须要cookie(可以不登录,只需要过了拖拽验证即可)。id为`https://live.douyin.com/1234567`后面的那串数字,也可以直接输入短网址类型`https://v.douyin.com/xxxx` |
| douyu | 2023/02/22 | `flv`清晰度可多选,但部分高清需要cookie |
| kuaishou | 2023/02/22 | `flv`清晰度可多选,必须要cookie(可以不登录,只需要过了拖拽验证即可) |
| douyin | 2023/02/22 | `flv`清晰度可多选,必须要cookie(可以不登录,只需要过了拖拽验证即可)。id为`https://live.douyin.com/1234567`后面的那串数字,也可以直接输入短网址类型`https://v.douyin.com/xxxx` |
| douyin2 | 2023/02/22 | 抖音的另一种解析方式,前者失败后可以尝试。`flv`清晰度可多选,必须要cookie(可以不登录,只需要过了拖拽验证即可)。id为`https://live.douyin.com/1234567`后面的那串数字,也可以直接输入短网址类型`https://v.douyin.com/xxxx` |
| yy | 2022/10/09 | `flv`清晰度可多选,必须要cookie(可以不登录,只需要过了拖拽验证即可) |
| huya | 2023/02/16 | `flv`清晰度可多选,可不需要cookie。部分视频时间戳校正后声音会变形,ffmpeg处理后正常 |
| huya2 | 2023/02/16 | 虎牙的另一种解析方式,只接受数字id,非数字的需要打开网页寻找(热度值左边)。`flv`清晰度可多选,可不需要cookie。部分视频时间戳校正后声音会变形,ffmpeg处理后正常 |
| acfun | 2022/09/25 | `flv`清晰度可多选,可不需要cookie |
| bili | 2023/01/07 | `flv`清晰度可多选,可不需要cookie |
| huya | 2023/02/22 | `flv`清晰度可多选,可不需要cookie。开播后要过一阵才能检测到。部分视频时间戳校正后声音会变形,ffmpeg处理后正常 |
| huya2 | 2023/02/22 | 虎牙的另一种解析方式,只接受数字id,非数字的需要打开网页寻找(热度值左边)。`flv`清晰度可多选,可不需要cookie。部分视频时间戳校正后声音会变形,ffmpeg处理后正常 |
| acfun | 2023/02/22 | `flv`清晰度可多选,可不需要cookie |
| bili | 2023/02/22 | `flv`清晰度可多选,可不需要cookie |
| zhanqi | 2019/06/30 | `flv`清晰度可多选,可不需要cookie |
| huajiao | 2019/06/02 | `flv`只支持默认清晰度(似乎只有一种清晰度) |
</details>

<details>
<summary>关于json配置</summary>
Expand Down Expand Up @@ -310,6 +317,7 @@ or传入参数: qnPri=蓝光4M>蓝光
## :smile:第三方库使用声明
+ 使用[JSON.org](https://github.com/stleary/JSON-java)库做简单的Json解析[![](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/stleary/JSON-java/blob/master/LICENSE)
+ 使用[Crypto-js](https://github.com/brix/crypto-js)仿浏览器生成斗鱼直播录制token[![](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/brix/crypto-js/blob/develop/LICENSE)
+ 参考[HuyaSender](https://github.com/xyxyxiaoyan/HuyaSender)解析虎牙[TarsTup](https://github.com/TarsCloud/TarsTup)协议[![](https://img.shields.io/badge/license-Tencent%20Binary%20License-green.svg)](https://tencentdingdang.github.io/dmsdk/licenses/android-wup-sdk/LICENSE.txt)
+ 虎牙对得到的直播流地址做进一步参数处理参考了[wbt5/real-url](https://github.com/wbt5/real-url/blob/df183eee17022d558cfc2aec221dfe632e360b13/huya.py#L11-L28)

## :smile:LICENSE
Expand Down
6 changes: 5 additions & 1 deletion UPDATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## 更新
+ V2.25.0
* 修复: 抖音直播`liver=douyin2`
* 修复[#113](https://github.com/nICEnnnnnnnLee/BilibiliLiveRecorder/issues/113): 虎牙从网页里面抠的内容有延迟,主播下播后可能误认为仍在直播。为此,获取直播链接后增加有效性检查。
* 新增[#5](https://github.com/nICEnnnnnnnLee/BilibiliLiveRecorder/issues/5) : 尝试使用另一种方式获取虎牙直播信息,该方式没有延迟。 `liver=huya2`
+ V2.24.0
* 修复[#105](https://github.com/nICEnnnnnnnLee/BilibiliLiveRecorder/issues/105),[#102](https://github.com/nICEnnnnnnnLee/BilibiliLiveRecorder/issues/105) `douyin`正则匹配修复
* 修复[#105](https://github.com/nICEnnnnnnnLee/BilibiliLiveRecorder/issues/105),[#102](https://github.com/nICEnnnnnnnLee/BilibiliLiveRecorder/issues/102) `douyin`正则匹配修复
* 修复快手录制
* 优化:去除解析器里面的`System.exit`使用

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>top.nicelee</groupId>
<artifactId>live-record</artifactId>
<version>2.24.0</version>
<version>2.25.0</version>
<name>iLiveRecord</name>
<description>B站、Acfun、斗鱼、虎牙、快手、抖音直播录制</description>
<properties>
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/nicelee/bilibili/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

public class Main {

final static String version = "v2.24.0";
final static String version = "v2.25.0";
public static Thread thRecord;
public static Thread thMonitor;
public static Thread thCommand;
Expand All @@ -27,18 +27,18 @@ public class Main {
*/
public static void main(String[] args) throws IOException {
// args = new String[]{"debug=true&liver=bili&id=3291024&delete=false&check=true"}; // 清晰度全部可选,可不需要cookie
// args = new String[] {
// "plugin=true&debug=false&check=true&retryAfterMinutes=0.5&retryIfLiveOff=true&liver=douyu&qnPri=蓝光4M>高清>蓝光8M>超清>蓝光>流畅&qn=-1&id=262537&fileName=测试{liver}-{name}-{startTime}-{endTime}-{seq}&" }; // 清晰度全部可选,但部分高清需要cookie
// args = new String[] { "debug=true&check=true&liver=kuaishou&id=3xh62hmw79fmc32&qn=0&delete=false&fileName=测试{liver}-{name}-{startTime}-{endTime}-{seq}&timeFormat=yyyyMMddHHmm" }; // 清晰度全部可选,可不需要cookie
// args = new String[]{"debug=true&check=true&liver=huya&id=11342412"}; // 清晰度全部可选,可不需要cookie
// args = new String[] {"debug=true&check=false&liver=douyu&id=312212&" }; // 清晰度全部可选,但部分高清需要cookie
// args = new String[] { "debug=true&check=false&liver=kuaishou&id=a74874888&" }; // 清晰度全部可选,可不需要cookie
// args = new String[]{"debug=true&check=false&liver=huya&id=189201"}; // 清晰度全部可选,可不需要cookie
// args = new String[]{"debug=true&check=false&liver=huya2&id=189201"}; // 清晰度全部可选,可不需要cookie
// args = new String[]{"debug=true&check=false&liver=yy&id=1355306560"}; // 清晰度全部可选,可不需要cookie
// args = new String[]{"debug=true&check=true&liver=yy&id=28581146"}; // 清晰度全部可选,可不需要cookie
// args = new String[]{"debug=true&check=true&liver=yy&id=29216766"}; // 清晰度全部可选,可不需要cookie
// args = new String[] { "debug=true&check=true&liver=zhanqi&id=90god" }; // 清晰度全部可选,可不需要cookie 90god huashan ydjs
// args = new String[] { "debug=true&check=true&liver=huajiao&id=278581432&qn=1" }; // 只支持默认清晰度(似乎只有一种清晰度)
// args = new String[] { "debug=true&check=true&liver=acfun&id=378269" };
// args = new String[] { "debug=true&check=true&liver=acfun&id=36626547" };
// args = new String[]{"debug=true&liver=douyin&id=https://v.douyin.com/dFfDBcU&delete=false&check=false"}; // 清晰度全部可选,需要跳过验证的cookie
// args = new String[]{"debug=true&liver=douyin&id=448984890564&delete=false&check=false"}; // 清晰度全部可选,需要跳过验证的cookie
// args = new String[]{"debug=true&liver=douyin2&id=922606105747&delete=false&check=false"}; // 清晰度全部可选,需要跳过验证的cookie
// args = new String[]{"debug=true&liver=douyin&id=https://v.douyin.com/EQBYoH&delete=false&check=false"}; // 清晰度全部可选,需要跳过验证的cookie
// args = new String[]{"debug=true&liver=douyin2&id=814607739589&delete=false&check=false"}; // 清晰度全部可选,需要跳过验证的cookie

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public String getLiveUrl(String roomId, String qn, Object... obj) {
}

JSONObject getLiveDataByShortId(String shortId) {
String apiUrl = "https://live.douyin.com/webcast/web/enter/?aid=6383&live_id=1&device_platform=web"
String apiUrl = "https://live.douyin.com/webcast/room/web/enter/?aid=6383&live_id=1&device_platform=web"
+ "&language=zh-CN&enter_from=web_live&cookie_enabled=true&screen_width=1536&screen_height=864"
+ "&browser_language=zh-CN&browser_platform=Win32&browser_name=Chrome&browser_version=94.0.4606.81"
+ "&room_id_str=&enter_source=&web_rid=" + shortId;
Expand Down

0 comments on commit e0706c1

Please sign in to comment.