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

[2020-04-28-beta1] Problem using Pixiv + Fanbox cookies together #684

Closed
photonometric opened this issue Apr 29, 2020 · 7 comments
Closed

Comments

@photonometric
Copy link

Encountered this while investigating a different download bug in this release. Happens consistently. Downloading this artist works fine in pixivutil20200424 with same config/cookies.

pixivutil20200428-beta1 in Win7

2020-04-29 00:00:11,673 - PixivUtil202000428-beta1 - INFO - Member id mode.
2020-04-29 00:00:20,160 - PixivUtil202000428-beta1 - INFO - Member IDs: [6489424]
2020-04-29 00:00:20,160 - PixivUtil202000428-beta1 - INFO - Processing Member Id: 6489424
2020-04-29 00:00:20,191 - PixivUtil202000428-beta1 - INFO - Member Url: https://www.pixiv.net/ajax/user/6489424/profile/all
2020-04-29 00:00:21,267 - PixivUtil202000428-beta1 - DEBUG - b'{"error":false,"message":"","body":{"illusts":{"80610329":null,"80610120":null,"80607376":null,"80030454":null,"79613649":null,"79359248":null,"79091420":null,"79039433":null,"78949297":null,"78603136":null,"78387138":null,"78259468":null,"78146681":null,"78146650":null,"70345255":null,"70344898":null,"67682285":null,"65836263":null,"61931438":null,"51336505":null,"40026408":null},"manga":{"79353626":null},"novels":[],"mangaSeries":[],"novelSeries":[],"pickup":[],"bookmarkCount":{"public":{"illust":1,"novel":1},"private":{"illust":0,"novel":0}},"externalSiteWorksStatus":{"booth":true,"sketch":true,"vroidHub":true}}}'
2020-04-29 00:00:21,283 - PixivUtil202000428-beta1 - DEBUG - using webrpc: https://www.pixiv.net/rpc/get_work.php?id=80610329
2020-04-29 00:00:23,139 - PixivUtil202000428-beta1 - ERROR - Error at processing Artist Info: (<class 'json.decoder.JSONDecodeError'>, JSONDecodeError('Expecting value: line 1 column 1 (char 0)'), <traceback object at 0x07174028>)
2020-04-29 00:00:23,139 - PixivUtil202000428-beta1 - ERROR - Traceback (most recent call last):
  File "PixivUtil2.py", line 447, in process_member
  File "PixivBrowserFactory.pyc", line 665, in getMemberPage
  File "PixivBrowserFactory.pyc", line 546, in getMemberInfoWhitecube
  File "json\__init__.pyc", line 357, in loads
  File "json\decoder.pyc", line 337, in decode
  File "json\decoder.pyc", line 355, in raw_decode
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

2020-04-29 00:00:23,139 - PixivUtil202000428-beta1 - INFO - Member Url: https://www.pixiv.net/ajax/user/6489424/profile/all
2020-04-29 00:00:23,139 - PixivUtil202000428-beta1 - DEBUG - b'{"error":false,"message":"","body":{"illusts":{"80610329":null,"80610120":null,"80607376":null,"80030454":null,"79613649":null,"79359248":null,"79091420":null,"79039433":null,"78949297":null,"78603136":null,"78387138":null,"78259468":null,"78146681":null,"78146650":null,"70345255":null,"70344898":null,"67682285":null,"65836263":null,"61931438":null,"51336505":null,"40026408":null},"manga":{"79353626":null},"novels":[],"mangaSeries":[],"novelSeries":[],"pickup":[],"bookmarkCount":{"public":{"illust":1,"novel":1},"private":{"illust":0,"novel":0}},"externalSiteWorksStatus":{"booth":true,"sketch":true,"vroidHub":true}}}'
2020-04-29 00:00:23,155 - PixivUtil202000428-beta1 - DEBUG - using webrpc: https://www.pixiv.net/rpc/get_work.php?id=80610329
2020-04-29 00:00:24,997 - PixivUtil202000428-beta1 - ERROR - Error at processing Artist Info: (<class 'json.decoder.JSONDecodeError'>, JSONDecodeError('Expecting value: line 1 column 1 (char 0)'), <traceback object at 0x06F0B828>)
2020-04-29 00:00:24,997 - PixivUtil202000428-beta1 - ERROR - Traceback (most recent call last):
  File "PixivUtil2.py", line 447, in process_member
  File "PixivBrowserFactory.pyc", line 665, in getMemberPage
  File "PixivBrowserFactory.pyc", line 546, in getMemberInfoWhitecube
  File "json\__init__.pyc", line 357, in loads
  File "json\decoder.pyc", line 337, in decode
  File "json\decoder.pyc", line 355, in raw_decode
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

(& etc for a very long time)

@Nandaka
Copy link
Owner

Nandaka commented Apr 29, 2020

Looks like similar issue with #674, can you verify the cookie value?

Looks like https://www.pixiv.net/rpc/get_work.php?id=80610329 return invalid data on your side.

Looks ok from my side (tested with image id= 81102991)

@photonometric
Copy link
Author

photonometric commented Apr 29, 2020

Yes indeed, I was having trouble with cookies earlier when starting with this new version, and read #674 and #505. However I re-checked just now, and my cookies are correctly copied from PHPSESSID and FANBOXSESSID, and login correctly and (for PHPSESSID) works fine in other recent versions. With a literally copy/pasted config.ini, v0424 is able to download that image (and all other img/artists on my list of errors), while v0428b1 throws various JSON errors.

Then I remembered reading in another issue recently that you don't use Fanbox, which got me thinking and testing...and the bug solution I come up with is: latest version 0428b1 can only functionally use cookies/OAuth? for either the main Pixiv site, OR Fanbox, in a config/session, but not both. This is even though both sites show as correctly logged in during program init.

If I put both PHPSESSID and FANBOXSESSID in config.ini, then pixivutil works great with FANBOX, and downloads my 'supported' members quite correctly, as in the last few versions. But during this session, it is unable to download from the main Pixiv site. It throws errors as described in my first post, or slightly different for imageID instead of artistID. [It also has a confusing error in which no error message is shown... but when downloading by artistID as normal, it will say something like Reading image 89 of 89 (which include new ones), then will immediately say no image found for artistID# and not even attempt to download anything].

If I remove FANBOXSESSID from config.ini and restart, then pixivutil works as it always has, including every errored image/artist on my list from when I had both cookies entered. But FANBOX returns errors when trying to download supported artists: Skipping post #####: because post is restricted

I hope this is right <3 I've tried it back and forth in both my database upgrade and fresh test programs, several times. I guess it's something to do with the login problems discussed in #680? Or maybe some similarities to #631 with complications by adding in the new FANBOX cookie. Anyway everything else works fine as long as I know this, and could switch or maintain separate copy for FANBOX needs, since they aren't many and don't rely on the program db.

@photonometric photonometric changed the title [2020-04-28-beta1] JSON Error Getting Artist Info [2020-04-28-beta1] Problem using Pixiv + Fanbox cookies together Apr 29, 2020
@Nandaka
Copy link
Owner

Nandaka commented Apr 29, 2020

yeah, looks like @bluerthanever accidentally clear the cookies when logging in to Fanbox

@bluerthanever
Copy link
Contributor

Oh. Really sorry.... I copied similar function and didn't check carefully... I will work on fixing it.

@bluerthanever
Copy link
Contributor

Urr. Seems to be taken care of... sorry again, and thank you.

@Nandaka
Copy link
Owner

Nandaka commented Apr 29, 2020

no problemo

@Nandaka
Copy link
Owner

Nandaka commented Apr 29, 2020

@photonometric do you need compiled version?

35122 pushed a commit to 35122/PixivUtil2 that referenced this issue Oct 30, 2020
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

3 participants