修复B站直播录制跳帧与斗鱼频繁输出错误日志问题 (#73)
* 新增配置斗鱼虎牙线路参数 * 现在,可以在配置文件中设置CDN * 现在,可以在配置文件中设置CDN * 修复斗鱼频繁输出错误日志的问题 * 新增platform参数值自定义 * 新增B站直播录制flv与m3u8线路自定义
This commit is contained in:
1 parent
d69498b63d
commit
c06b13fea7
3 files changed
+11
-5
No files matched your search
@@ -3,6 +3,7 @@ import random
|
||||
import requests
|
||||
|
||||
from . import match1, logger
|
||||
from .. import config
|
||||
from ..engine.decorators import Plugin
|
||||
from ..engine.download import DownloadBase
|
||||
|
||||
@@ -34,10 +35,11 @@ class Bilibili(DownloadBase):
|
||||
# artist = api3_data['data']['info']['uname']
|
||||
# title = '{} - {}'.format(title, artist)
|
||||
# logger.debug(title)
|
||||
biliplatform = config.get('biliplatform') if config.get('biliplatform') else 'web'
|
||||
params = {
|
||||
#'https_url_req': 1,
|
||||
'cid': vid,
|
||||
'platform': 'h5',
|
||||
'platform': biliplatform,
|
||||
'qn': 10000,
|
||||
#'ptype': '16'
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ import platform
|
||||
import json
|
||||
from urllib.parse import urlencode
|
||||
|
||||
from ykdl.common import url_to_module
|
||||
from ykdl.extractors.douyu.util import ub98484234
|
||||
from ykdl.util.jsengine import chakra_available, quickjs_available, external_interpreter
|
||||
from ykdl.util.html import get_content
|
||||
@@ -52,6 +51,9 @@ class Douyu(DownloadBase):
|
||||
html_content = get_content('https://www.douyu.com/lapi/live/getH5Play/{}'.format(self.vid), data=data)
|
||||
live_data = json.loads(html_content)
|
||||
live_data = live_data["data"]
|
||||
real_url = '{}/{}'.format(live_data['rtmp_url'], live_data['rtmp_live'])
|
||||
self.raw_stream_url = real_url
|
||||
return True
|
||||
try:
|
||||
real_url = '{}/{}'.format(live_data['rtmp_url'], live_data['rtmp_live'])
|
||||
self.raw_stream_url = real_url
|
||||
return True
|
||||
except TypeError:
|
||||
return False
|
||||
@@ -25,6 +25,8 @@ file_size: 2621440000
|
||||
# 如遇到斗鱼录制卡顿可以尝试切换线路,tct-h5(备用线路5),ali-h5(备用线路6),akm-h5(主线路1)
|
||||
#huyacdn: AL
|
||||
# 如遇到虎牙录制卡顿可以尝试切换线路,AL(阿里),BD(百度),TX(腾讯)
|
||||
#biliplatform: web
|
||||
# 如遇到哔哩哔哩录制跳帧可以尝试修改platform值,web(flv),h5(m3u8)
|
||||
|
||||
streamers:
|
||||
星际2Stats拔本神族天梯第一视角: # 最小配置示例
|
||||
|
||||
Reference in new issue
Block a user