Skip to content
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

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

Open
aksskl opened this issue Aug 6, 2024 · 23 comments
Open

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

aksskl opened this issue Aug 6, 2024 · 23 comments

Comments

@aksskl
Copy link

aksskl commented Aug 6, 2024

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
Copy link
Contributor

Yeah, Fanbox has changed again.

@emerladCoder
Copy link

emerladCoder commented Aug 7, 2024

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
Copy link

Where do those files go?

@emerladCoder
Copy link

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
Copy link

@emerladCoder Combining that with #1352 (comment) fixes the current fanbox issues. Thanks!

@Butterfly-Dragon
Copy link

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
Copy link

TheDoc69 commented Aug 10, 2024

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
Copy link

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

@Butterfly-Dragon
Copy link

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

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

#1361 (comment)

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

@vartiens
Copy link

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

@lazylazfo
Copy link

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
Copy link

DisasterInbound commented Aug 21, 2024

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

Nandaka pushed a commit that referenced this issue Aug 22, 2024
* Update PixivBrowserFactory.py

* Update PixivModelFanbox.py

* Update PixivBrowserFactory.py
@lazylazfo
Copy link

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

@aksskl
Copy link
Author

aksskl commented Aug 26, 2024

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
Copy link

마침내 이 문제를 해결하는 데 성공했습니다!! 감사합니다!!

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

@lazylazfo
Copy link

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
Copy link

저는 아직 이 문제를 해결하지 못했습니다. 어떻게 처리하셨나요?

https://github.com/Nandaka/PixivUtil2 zip 파일로 마스터 코드를 다운로드합니다. 다음 테스트 폴더를 제거합니다. 그리고 [PixivUtil2.py] 파일을 exe 파일로 변환합니다. (Python을 보내드립니다)

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

@DisasterInbound
Copy link

Anyone knows how to fix this error?

@aksskl
Copy link
Author

aksskl commented Aug 31, 2024

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

@beta52ojy
Copy link

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
Copy link

When will these fixes be added to the main exe?

@esserius
Copy link

Any chance this will get added to an update?

@icedstick
Copy link

icedstick commented Oct 7, 2024

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 😭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests