kent-lee / pixiv-scraper

personal project for downloading artworks from Pixiv
40 stars 5 forks source link

Error: Cannot download user favorites #3

Open DonaldTsang opened 5 years ago

DonaldTsang commented 5 years ago

Typing python main.py bookmarks will lead to this: Exception: 401 Unauthorized for function: user_bookmarks(). Please call login() first

Possible solution: testing and de-bugging tools

P.S. please write in the notes that username is not the same as email in config.json

kent-lee commented 5 years ago

I have just encountered this error, and found that the main problem is due to the login() function. Apparently, Pixiv has implemented a reCAPTCHA check against the login process recently, which breaks the login() function and thereby any other function associated with it. For example, user_artworks() can no longer provide the full list of artwork IDs from a given artist because the user is not logged in. Likewise, for user_bookmarks(), it returns an error stating that the user is not logged in, and therefore cannot retrieve the bookmarks information.

For the username, I am not sure about the issue. I think you can use email as the Pixiv ID in config.json, as that is what I have been using.

I am a little busy right now, but I will look into this issue as soon as possible. Thank you for notifying me this, and please let me know if there is any other question.

DonaldTsang commented 5 years ago

@Kent-Lee I tried using the gallery function, and it works, BUT not for the bookmarks functions, which is kinda odd considering I already added the username and password in config.json

kent-lee commented 5 years ago

@DonaldTsang by the gallery function you mean the user_artworks() function? If so then yes it works, but only partially. The function can be used without logging in, but it will not provide all artwork IDs of the given artist. Therefore in the readme, I suggested to login first in order to get all contents.

kent-lee commented 5 years ago

@DonaldTsang sorry for the late reply, I was busy for the past few days. I have tested the program again and found that this issue seems to appear at random times. Most of the times the program works as expected, but sometimes the program has login issue and thus cannot download certain contents. I will test the program more to see if there is a pattern / condition for this event.

DonaldTsang commented 5 years ago

@Kent-Lee will ask from https://github.com/Nandaka/PixivUtil2 and https://github.com/mikf/gallery-dl about the issue, because they seem to know about it.

SansPapyrus683 commented 3 years ago

Any updates on this?