mirror of
https://github.com/omg-xtao/ytdlbot.git
synced 2025-01-30 17:58:36 +00:00
fix: bilibili
This commit is contained in:
parent
7b5a0f7a46
commit
b7350d719e
@ -34,6 +34,7 @@ services:
|
||||
- redis
|
||||
volumes:
|
||||
- ./data/instagram.com_cookies.txt:/ytdlbot/ytdlbot/instagram.com_cookies.txt
|
||||
- ./data/bilibili.com_cookies.txt:/ytdlbot/ytdlbot/bilibili.com_cookies.txt
|
||||
- ./data/vnstat/:/var/lib/vnstat/
|
||||
|
||||
flower:
|
||||
|
@ -294,6 +294,8 @@ def convert_audio_format(resp: "dict", bm):
|
||||
def add_instagram_cookies(url: "str", opt: "dict"):
|
||||
if url.startswith("https://www.instagram.com"):
|
||||
opt["cookiefi22"] = pathlib.Path(__file__).parent.joinpath("instagram.com_cookies.txt").as_posix()
|
||||
elif "bilibili" in url or "b23.tv" in url:
|
||||
opt["cookiefile"] = pathlib.Path(__file__).parent.joinpath("bilibili.com_cookies.txt").as_posix()
|
||||
|
||||
|
||||
def run_splitter(video_path: "str"):
|
||||
|
@ -358,7 +358,7 @@ def gen_cap(bm, url, video_path):
|
||||
)
|
||||
remain = bot_text.remaining_quota_caption(chat_id)
|
||||
worker = get_dl_source()
|
||||
cap = f"{user_info}\n`{file_name}`\n\n{url}\n\nInfo: {meta['width']}x{meta['height']} {file_size}\t" \
|
||||
cap = f"`{file_name}`\n\n{url}\n\nInfo: {meta['width']}x{meta['height']} {file_size}\t" \
|
||||
f"{meta['duration']}s\n{remain}\n{worker}\n{bot_text.custom_text}"
|
||||
return cap, meta
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user