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
——————————————分割线——————————————
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
set_accepted_language 会改变返回的结果里的 tag 的翻译文本。
set_accepted_language
tag
api = get_pixiv_api() pid = 114518297 print('Without Accepted-Language:') response = api.illust_detail(pid) for tag in response.illust.tags[:5]: print(tag.name, tag.translated_name) print('\n') print('With Accepted-Language:') api.set_accept_language('zh-hans') response = api.illust_detail(pid) for tag in response.illust.tags[:5]: print(tag.name, tag.translated_name)
结果如下:
Without Accepted-Language: 初音ミクシンフォニー Hatsune Miku symphony 蓄音機ミク None 初音ミク hatsune miku VOCALOID10000users入り Vocaloid 10000+ bookmarks VOCALOID None With Accepted-Language: 初音ミクシンフォニー Hatsune Miku symphony 蓄音機ミク None 初音ミク 初音未来 VOCALOID10000users入り Vocaloid 10000+ bookmarks VOCALOID None
可以发现 初音ミク 对应的 translated_name 有不同。
初音ミク
translated_name
对,这个参数只影响 translated_name,取决于Pixiv有没有响应对应的接口参数。 你可以打印 tag 返回出来看看
No branches or pull requests
——————————————分割线——————————————
The text was updated successfully, but these errors were encountered: