Skip to content
New issue

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

使用问题 #140

Open
yaoysyao opened this issue Sep 8, 2023 · 2 comments
Open

使用问题 #140

yaoysyao opened this issue Sep 8, 2023 · 2 comments

Comments

@yaoysyao
Copy link

yaoysyao commented Sep 8, 2023

我有一个需求就是每次上传文件时我希望可以指定请求头中的x-device-id参数,比如我要上传5个文件,每个文件使用不同的device-id,这个应该怎么样设置?我的使用方法如下,但是无效;
aligo = Aligo(refresh_token=self.refresh_token, level=50, name=self.account_config_name, re_login=False)
for i in rang(0,5):
UNI_HEADERS.update({
"x-device-id": device_id
})
aligo.upload_files()

但是好像并没有每次都更新device-id这个请求头参数

@lemisky
Copy link
Member

lemisky commented Sep 9, 2023

ali._auth.session.headers['x dede]=xxx

大概这样,但修改后不知道请求会不会被 block

@yaoysyao
Copy link
Author

yaoysyao commented Sep 9, 2023

ali._auth.session.headers['x dede]=xxx

大概这样,但修改后不知道请求会不会被 block

好的,我试试

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants