We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import argparse parser = argparse.ArgumentParser() parser.add_argument('--url','-l',nargs='+') args=parser.parse_args() print(args.url)
这块是直接从命令行读取地址 比如
python3 main.py -l "https://live.bilibili.com/9510613" "https://huya.com/8mi.tech"
那么这家伙会以数组的方式 返回这两串内容
['https://live.bilibili.com/9510613', 'https://huya.com/8mi.tech']
还有还有,传入参数后就不要再问输入地址了
if args.url: a=args.url else: a = input('请输入直播间地址:\n') asyncio.run(main(a))
然后我希望的是 这个程序能多线程的形式 同时处理多个平台的弹幕 可以用参数来判断是否开启多平台模式
if len(args.url) > 1: multi_live=true
并且我希望说 输出的格式是这样的
print("["+str(datetime.datetime.now())+"] ["+platform+"] "+f'{m["name"]}:{m["content"]}')
而这个platform这个参数 对应弹幕来源 比如从bilibili发送的弹幕 输出的是
[2022-12-12 23:44:21.236815] [bili] [勋章名称|等级]八蓝米科技Company:测试弹幕
总结,我要的效果就是说 输入命令
输出的结果是(仅限multi_live=true的情况下这样输出)
[2022-12-12 23:44:21.236815] [bili] [八蓝米|18]八蓝米科技Company:测试弹幕 [2022-12-12 23:44:21.236815] [huya] [勋章名称|等级]8yl丶以勒:测试弹幕
因为我不太会实现,毕竟你的代码,我也不太好动
The text was updated successfully, but these errors were encountered:
并且建议 这个项目的danmu文件夹迁移到其他仓库 分开来会比较好点(个人觉得)
Sorry, something went wrong.
No branches or pull requests
这块是直接从命令行读取地址 比如
那么这家伙会以数组的方式 返回这两串内容
还有还有,传入参数后就不要再问输入地址了
然后我希望的是 这个程序能多线程的形式 同时处理多个平台的弹幕
可以用参数来判断是否开启多平台模式
并且我希望说 输出的格式是这样的
而这个platform这个参数 对应弹幕来源 比如从bilibili发送的弹幕 输出的是
总结,我要的效果就是说
输入命令
输出的结果是(仅限multi_live=true的情况下这样输出)
因为我不太会实现,毕竟你的代码,我也不太好动
The text was updated successfully, but these errors were encountered: