Nandaka / PixivUtil2

Download images from Pixiv and more!
http://nandaka.devnull.zone/
BSD 2-Clause "Simplified" License
2.38k stars 254 forks source link

[Fanbox] f1 f2 getting post id api error #1361

Open aksskl opened 3 months ago

aksskl commented 3 months ago

Started getting an error today when using f1 and f2. Tried using the latest master and windows executable and both can't get post ids for fanbox accounts.

Unknown Error, please check the log file: (<class 'TypeError'>, TypeError('list indices must be integers or slices, not str'), <traceback object at 0x0000022DA217B0C0>)

f3 works, downloading using fanbox post id works. Pixiv downloads seem fine too, after a quick test.

The error seems to happen when getting the post ids for fanbox accounts.

biggestsonicfan commented 3 months ago

Yeah, Fanbox has changed again.

emerladCoder commented 3 months ago

Yeah, the next page is no longer returned by the post.listCreator api call. Instead that just returns a List of posts.

To get the paging it will be necessary to call post.paginateCreator first which will return a list of all page URLs. Then we can increment through those page URLs as the next page instead.

I have a fix applied in my local files (PixivModelFanbox.py and PixivBrowserFactory.py). If someone wants to reference those and make an update. I'm at work atm, don't have time to do a full pull request etc. PixivUtil.zip

Also I don't know if this fixes in all locations/code paths. I just fixed it for my use case.

LordBarsdale commented 3 months ago

Where do those files go?

emerladCoder commented 2 months ago

Where do those files go?

These are source files, you would need to download the source files, replace/update the two provided files, then run from source using Python as mentioned in the main readme.

Running from source code:

You have to have python installed, install the requirements.txt using PIP and then run the python file PixivUtil2.py instead of using the executable version from the releases.

vampiricwulf commented 2 months ago

@emerladCoder Combining that with https://github.com/Nandaka/PixivUtil2/issues/1352#issuecomment-2227002669 fixes the current fanbox issues. Thanks!

Butterfly-Dragon commented 2 months ago

hmmmm.... @emerladCoder nope, that did not fix it for me even combining it with the changes mentioned by vampiricwulf. What am i doing wrong? Or are you still having these problems too?

TheDoc69 commented 2 months ago

I still got an error in my case even with the multiples changes

2024-08-09 19:06:14,542 - PixivUtil20240703 - ERROR - Unknown Error: object of type 'NoneType' has no len() Traceback (most recent call last): File "d:\python\PixivUtil2.py", line 1745, in main np_is_valid, op_is_valid, selection = main_loop(ewd, op_is_valid, selection, np_is_valid, args, options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "d:\python__\PixivUtil2.py", line 1467, in main_loop menu_fanbox_download_from_list(op_is_valid, PixivModelFanbox.FanboxArtist.SUPPORTING, args, options) File "d:\python\PixivUtil2.py", line 945, in menu_fanbox_download_from_list PixivFanboxHandler.process_fanbox_artist_by_id(sys.modules[name], File "d:\python__\PixivFanboxHandler.py", line 50, in process_fanbox_artist_by_id posts = br.fanboxGetPostsFromArtist(artist, next_url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "d:\python\PixivBrowserFactory.py", line 1048, in fanboxGetPostsFromArtist posts = artist.parsePosts(response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "d:\python\PixivModelFanbox.py", line 599, in parsePosts if self.PageIndex < len(self.Pages): ^^^^^^^^^^^^^^^ TypeError: object of type 'NoneType' has no len()

Modifying line 526 of PixivModelFanbox.py provided by emeraldCoder removed this error
I changed "Pages = None" to "Pages = [0]" I don't know if it has any other consequence (maybe not getting all posts ?), but I managed to download all the posts from 2 weeks ago (my last update) with no error using f1 and f2.

LordBarsdale commented 2 months ago

Anyone want to explain how to do this for us stupids?

Butterfly-Dragon commented 2 months ago

Anyone want to explain how to do this for us stupids?

https://github.com/user-attachments/files/16531982/PixivUtil.zip

https://github.com/Nandaka/PixivUtil2/issues/1361#issuecomment-2275990761

https://github.com/emerladCoder explained it but i still can't get it to work

vartiens commented 2 months ago

@emerladCoder Thanks for the fix. Works swiftly for me - I used pixiv.net (Korean) to login so didn't have any issues there.

lazylazfo commented 2 months ago

I still haven't solved this problem... A graduate of humanities college, I just pray for a new version to come out every day๐Ÿ˜ญ๐Ÿ˜ญ

DisasterInbound commented 2 months ago

Hello, I need help. I installed it from source and replaced the files shared here by emerladCoder however I'm unable to log in. This is the log file pixivutil.log

I have no problem with log in using the executable (source version and executable version are in 2 different folders) but I get this same error message when using the source. I also edited the line as mentioned here but that didn't fix it either

lazylazfo commented 2 months ago

I finally succeeded in solving this problem!! Thank you!!

aksskl commented 2 months ago

The latest master works, but while I was testing there seems to be an issue with fanbox accounts that have zero posts.

IndexError('list index out of range'

dazzlekor commented 2 months ago

๋งˆ์นจ๋‚ด ์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๋Š” ๋ฐ ์„ฑ๊ณตํ–ˆ์Šต๋‹ˆ๋‹ค!! ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!!

I still haven't solved this problem. How did you solve it?

lazylazfo commented 2 months ago

I still haven't solved this problem. How did you solve it?

https://github.com/Nandaka/PixivUtil2 Download master code by zip file. After that, remove the test folder. And convert [PixivUtil2.py]file as a exe file. (You have to use Python)

dazzlekor commented 2 months ago

์ €๋Š” ์•„์ง ์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜์ง€ ๋ชปํ–ˆ์Šต๋‹ˆ๋‹ค. ์–ด๋–ป๊ฒŒ ์ฒ˜๋ฆฌํ•˜์…จ๋‚˜์š”?

https://github.com/Nandaka/PixivUtil2 zip ํŒŒ์ผ๋กœ ๋งˆ์Šคํ„ฐ ์ฝ”๋“œ๋ฅผ ๋‹ค์šด๋กœ๋“œํ•ฉ๋‹ˆ๋‹ค. ๋‹ค์Œ ํ…Œ์ŠคํŠธ ํด๋”๋ฅผ ์ œ๊ฑฐํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  [PixivUtil2.py] ํŒŒ์ผ์„ exe ํŒŒ์ผ๋กœ ๋ณ€ํ™˜ํ•ฉ๋‹ˆ๋‹ค. (Python์„ ๋ณด๋‚ด๋“œ๋ฆฝ๋‹ˆ๋‹ค)

This converted executable will be terminated immediately. "cmd: pip installer PixivUtil2.py"

DisasterInbound commented 2 months ago

Anyone knows how to fix this error?

aksskl commented 2 months ago

@DisasterInbound Change pixiv's website language to Japanese, while logged on your account in your browser.

beta52ojy commented 2 months ago

I'm still not getting it to work, am I doing something wrong? โ†’ Installed pyinstaller, โ†’ Download master code by zip file. After that, remove the test folder. โ†’ Type "pyinstalle PixivUtil2.py" in the address bar of Windows Explorer โ†’ Exe file is created but does nothing.

I still haven't solved this problem. How did you solve it?

https://github.com/Nandaka/PixivUtil2 Download master code by zip file. After that, remove the test folder. And convert [PixivUtil2.py]file as a exe file. (You have to use Python)

LordBarsdale commented 1 month ago

When will these fixes be added to the main exe?

esserius commented 1 month ago

Any chance this will get added to an update?

icedstick commented 4 weeks ago

I will donate $15 to @Nandaka if all of these fixes are applied to the main PixivUtil2.exe before the end of this month! Hope that provides a little encouragement for much appreciated work ๐Ÿ˜ญ

LockNear commented 2 weeks ago

Can someone just upload there compiled master.exe ? I compiled exe's multiple times and they all kept closing immediately when I start them.

TheSonic03 commented 5 days ago

I'm still not getting it to work, am I doing something wrong? โ†’ Installed pyinstaller, โ†’ Download master code by zip file. After that, remove the test folder. โ†’ Type "pyinstalle PixivUtil2.py" in the address bar of Windows Explorer โ†’ Exe file is created but does nothing.

I still haven't solved this problem. How did you solve it?

https://github.com/Nandaka/PixivUtil2 Download master code by zip file. After that, remove the test folder. And convert [PixivUtil2.py]file as a exe file. (You have to use Python)

The command is "pyinstaller PixivUtil2.py", you missed the "r"