修复 pixiv 图片缺少的问题。

This commit is contained in:
Xtao_dada 2021-01-16 21:31:51 +08:00 committed by GitHub
parent 4ec5cd7f7f
commit cc36f04c15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
vip.py
View File

@ -42,7 +42,7 @@ async def pixiv(context):
pixiv_albums = pixiv_list[1].split('|||') pixiv_albums = pixiv_list[1].split('|||')
pixiv_album = [] pixiv_album = []
await context.edit("下载图片中 . . .") await context.edit("下载图片中 . . .")
for i in range(0, len(pixiv_albums) - 1): for i in range(0, len(pixiv_albums)):
r = get(pixiv_albums[i]) r = get(pixiv_albums[i])
with open("pixiv." + str(i) + ".jpg", "wb") as code: with open("pixiv." + str(i) + ".jpg", "wb") as code:
code.write(r.content) code.write(r.content)