Open Air847735 opened 1 day ago
If somehow the illustration ID is invalid or deleted, the response of illust_detail()
will looks like:
res = api.illust_detail(9999999999)
print(res)
# {'error': {'user_message': 'Page not found', 'message': '', 'reason': '', 'user_message_details': {}}}
So illust
attribute doesn't exist.
You can record the illustration IDs when you encountered any errors and it can help debugging a lot.
I try to combine pixiv pictures in writing DC-bot The goal is to capture the pixiv URL in the DC chat room and then upload the pictures to DC for viewing.
But after setting it up for a period of time, NoneType' object has no attribute 'meta_single_page will appear.
Does anyone know how to avoid this situation?
Code: