Open nautics889 opened 7 months ago
Thank you for submitting the MR, and point out the issue in the /v1/illust/comments
.
I will review it as soon as possible and attempt to fix the problems.
It seems that this API have moved to:/v3/illust/comments
. This API is used in the newest version of Pixiv APP, but it has modified the data format compared to /v1/novel/comments
:
res_illust_comments = api.illust_comments(112518890) #modified to /v3/illust/comments
print(res_illust_comments)
The output:
{'comments': [{'id': 175138655,
'comment': '',
'date': '2024-04-21T01:13:02+09:00',
'user': {'id': 104906901,
'name': '片神',
'account': 'user_uaud2225',
'profile_image_urls': {'medium': 'https://s.pximg.net/common/images/no_profile.png'}},
'has_replies': False,
'stamp': {'stamp_id': 304,
'stamp_url': 'https://s.pximg.net/common/images/stamp/generated-stamps/304_s.jpg?20180605'}},
{'id': 172222064,
'comment': '舌头怎么会起泡呢?(heaven)',
'date': '2024-02-29T19:35:02+09:00',
'user': {'id': 53603145,
'name': '落痕',
'account': 'user_ppca3242',
'profile_image_urls': {'medium': 'https://i.pximg.net/user-profile/img/2022/04/09/15/43/20/22523559_58cee495392fa3642588b8b60608be37_170.png'}},
'has_replies': False,
'stamp': None},
{'id': 168526698,
'comment': '(excited3)(excited3)',
'date': '2023-12-27T03:31:15+09:00',
'user': {'id': 38047701,
'name': '熵玄',
'account': 'zmr0911',
'profile_image_urls': {'medium': 'https://i.pximg.net/user-profile/img/2023/05/04/22/16/01/24377699_a7c5db9504b715c19df387ba66f804cb_170.png'}},
'has_replies': False,
'stamp': None},
...],
'next_url': None,
'comment_access_control': 0}
And if you want to get the replies of a certain comment, you must call v2/illust/comments/replies?comment_id=...&offset=...
Context:
Python 3.11.4 PixivPy 3.7.5
Steps to reproduce
python ./demo.py
aapi.illust_comments(59580629)
.Description
There in
illust_comments()
method,self.no_auth_requests_call(...)
seems to be returning Response [404].Local context:
...and my headers when calling
self.requests_call(...)
I believe it'd be worth checking if
/v1/illust/comments
is still available, probably.