-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
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
Remove retriving bookmarks function #1160
Conversation
It is to skip the post if the bookmark limit is defined when you download by tags. If you remove this code, then it will download all images when you set a limit. If you want to skip this bookmark data retrieval, then just set the limit to 0/None from the console input. https://github.com/Nandaka/PixivUtil2/blob/master/PixivUtil2.py#L366 |
bookmark skipping and grouping works fine for image mode because there is skipping function in PixivImageHandler.py L174 The reason why i had to remove this function, retriving bookmark data cause IP ban from pixiv, and we actually get bookmarkdata it makes actually faster download because it skips getting bookmark data for posts which already in database |
But if the image doesn't exists in the db, it still need to get the bookmark data. Only if you are registered premium user that have the data from the json response, I think? PixivUtil2/PixivBrowserFactory.py Line 832 in b723feb
fyi, bookmark data is empty from server and it is only available when you load the page, which I think it is more expensive to run? and you still need to get the page anyway if you want to filter by bookmark count. Maybe you can add a logic to skip this you are premium user? e.g. PixivUtil2/PixivBrowserFactory.py Line 867 in b723feb
|
I'm not using premium now and I'm using bookmark count skip feature. pixivutil gets bookmark data who does not using premium. It was an ideal codes to use bookmark count skipping without being IP ban. issue #1159 I tried to add 2 second wait to every loop for bookmark retriving function using wait(result, self.__config) so my Idea was just using functions in PixivImageHandler to make some delay to prevent ban. so.. this code will use more CPU time but less Physical time... for wait() this is not perfect solution for it so just for reference |
can you confirm after running it for some time? because after the change, then it will always fetch the image page and then skipping it if the bookmark count is lower ==> which in turn, currently it will cause 429 error due to it request too many image page too often. |
3sec is seems fine too (1hr test) - @Nandaka |
sorry for the late reply, I was just back. Anyway, it is merged now |
for #1159
removing retriving bookmarks infomation to prevent ban.
it works fine for tags mode but idk why code get bookmarks seperatly before download...