Closed shaoyangx closed 2 months ago
not authorized. please login first
Please use tdl login
to login before invoking other commands.
not authorized. please login first
Please use
tdl login
to login before invoking other commands. But I've logged in to the namespace, and running the same code under bat works just fine.Python calls do not succeed
@ECHO OFF
set TDL_NS=year && set TDL_PROXY=socks5://127.0.0.1:10809
set path=bin;%path%
tdl chat ls
This command can correctly call the channel list
It's python code' error.
I guess this can't set environment variables.
os.environ['TDL_PROXY']='socks5://127.0.0.1:10809'
os.environ['TDL_NS']='year'
There is nothing wrong with this environment variable. I used to be able to call it in Python, but one day it suddenly lapsed. In the middle of this, I didn't actively update the TDL version and Python. Maybe I should build an older version of Python for testing (maybe some of the environment configuration changes by accident?)
def config():
global tdl
#默认运行设置
os.environ['TDL_PROXY']='socks5://127.0.0.1:10809'
tdl = 'tdl.exe'
## Omitted……
def dl(): #下载模块
for root, dirs, files in os.walk('json'):
for f in files:
Channel_name = os.path.splitext(f)
if Channel_name[1] == '.json':
## 下载 -d指定下载目录 -f官方客户端导出的文件 -e黑名单 -i 白名单 --continue 不交互直接继续
subprocess.run([tdl,'dl','-f','json/' + f,'-d','dl/' + Channel_name[0] ,'-e','webp,webm,png,jpg,tgs,apk','--skip-same','--continue','--reconnect-timeout','0'])
@shaoyangx The issue is most likely with the Python code, and I can't help you further.
Describe the bug
我以前使用的自动下载的流程,但是很久未使用后,发现无法正常调用。(使用python的原因是bat无法便捷获取unix时间) 已在常规CMD进行测试,使用此命名空间可正常下载。 Python 3.12.3 tdl 0.17.3 在用以下代码调用tdl的时候,会显示未登录。 错误信息:
To Reproduce
使用代码如下
Expected behavior
成功调用
Version
Version: 0.17.3 Commit: 6c382b8 Date: 2024-07-07T10:59:56Z
go1.21.11 windows/amd64
Which OS are you running tdl on?
Windows
Additional context
No response