Skip to content

Commit

Permalink
标题中添加了时间戳
Browse files Browse the repository at this point in the history
  • Loading branch information
b3nguang committed Jul 2, 2024
1 parent ebe2335 commit e317d45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
# Go workspace file
go.work
go.work.sum

cookies.json
.DS_Store
5 changes: 5 additions & 0 deletions download_plugin/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"net/url"
"os"
"strings"
"time"
)

func getLiveRoomPublicInfo(roomId, liveUuid string, Thread int) {
Expand Down Expand Up @@ -64,6 +65,10 @@ func getLiveRoomPublicInfo(roomId, liveUuid string, Thread int) {
title := result["openLiveDetailModel"].(map[string]interface{})["title"].(string)
playbackUrl := result["openLiveDetailModel"].(map[string]interface{})["playbackUrl"].(string)

// 获取当前时间并格式化
currentTime := time.Now().Format("2006-01-02 15:04:05")
title += "_" + currentTime

fmt.Println("标题:", title)
fmt.Println("请求网址:", playbackUrl)
M3u8Down(title, playbackUrl, Thread)
Expand Down

0 comments on commit e317d45

Please sign in to comment.