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

Pixiv bridge: Support login #2759

Open
guldor12 opened this issue May 28, 2022 · 8 comments
Open

Pixiv bridge: Support login #2759

guldor12 opened this issue May 28, 2022 · 8 comments
Labels
Bridge-Feature-Request Request for a new bridge feature

Comments

@guldor12
Copy link

Is your feature request related to a problem? Please describe.
Pixiv doesn't display R-18 and R-18G works to unregistered users.
Examples:
User with R-18 works (some non-R-18 works are also hidden)
User with R-18G (gore) works

Describe the solution you'd like
Login support should be added/documented like with Instagram/Twitter. It may be possible to copy cookies like with the Furaffinity bridge, but I haven't looked into it much.

Describe alternatives you've considered
I'm not aware of any way to access R-18+ works without an account.

Additional context
This would also be a prerequisite for adding a bridge for https://www.pixiv.net/bookmark_new_illust.php which displays recent works of your followed users. That endpoint would also be nice for users with lots of follows since it would avoid hammering pixiv's servers.

@guldor12 guldor12 added the Feature-Request Issue is a feature request label May 28, 2022
@yamanq
Copy link
Contributor

yamanq commented May 28, 2022

If this is added, it should be as a checkbox, "Show R-18 works"

@yamanq yamanq added Bridge-Feature-Request Request for a new bridge feature and removed Feature-Request Issue is a feature request labels May 28, 2022
@dvikan
Copy link
Contributor

dvikan commented Jun 4, 2022

As discussed earlier, this goes against the nature of the project. But I can accept placing this bridge in e.g. ./contrib folder. Or add a configuration value that is used if present. I guess im okay with a form field with the user and pass but I don't like it.

@guldor12
Copy link
Author

guldor12 commented Jun 5, 2022

Configuration values for API keys were what I was thinking of, like the Twitter bridge. And now that I think about it, R-18/R-18G is a toggle in account settings, not cookies, so non-logged in bridges wouldn't need a useless check box added. Unfortunately the https://www.pixiv.net/bookmark_new_illust.php endpoint is only available for the logged in user, so maybe a bridge could be added to the ./contrib folder to support it.

Also, I looked into it more and getting a Pixiv API key is a huge hassle, but if you require the user to input their API key to a static config file, you can have them follow these instructions and paste the refresh token where RSS-Bridge can find it. RSS-Bridge would then need to fetch and cache a new refresh and auth token and their expiration time and repeat whenever they expire. One problem with this is that the refresh token in the config would no longer refer to any valid token, but maybe RSS-Bridge could just associate this old token with its current state and refresh using it only when it changes.

@mruac
Copy link
Contributor

mruac commented Sep 3, 2023

@guldor12 I'm looking into this, why not use the PHPSESSID cookie instead? I'm not sure if pixiv renews the cookie when it is about to expire, but the bridge can certainly check and update the cookie in the cache as it changed.

@mruac
Copy link
Contributor

mruac commented Sep 3, 2023

I'm also not sure why this bridge caches the images yet - I'm going to see if using no-referrer on the images will work.

edit: oh what fun they need a referrer to view the image.

@mruac
Copy link
Contributor

mruac commented Sep 3, 2023

Difference between using cookie and oauth are different endpoints / and datasets to work with, but for compatibility reasons I'll work with cookies instead.

Both resulting links to images still require a referrer set to Pixiv, so caching / proxying the images are still required.

mruac added a commit to mruac/mruac-rss-bridge that referenced this issue Sep 3, 2023
@mruac
Copy link
Contributor

mruac commented Sep 3, 2023

Good site to proxy images from. They also have a handy nginx or Cloudflare worker profile to use for self-hosters.
https://pixiv.cat

dvikan pushed a commit that referenced this issue Sep 6, 2023
* added cookie mgmt and support for issue
#2759

* added image proxy option

* + mature and ai options, + cookie doc

* mention doc

* check cookie is auth'd
@mruac
Copy link
Contributor

mruac commented Sep 7, 2023

@guldor12 R-18 works are now supported if you follow the bridge specific documentation when hosting rss-bridge yourself.

Re: the bridge for https://www.pixiv.net/bookmark_new_illust.php You are still able to follow each user individually without needing to create a new (or edit this) bridge, but you are welcome to keep this issue open if someone is willing to add support.

dvikan pushed a commit to dvikan/rss-bridge that referenced this issue Sep 13, 2023
* added cookie mgmt and support for issue
RSS-Bridge#2759

* added image proxy option

* + mature and ai options, + cookie doc

* mention doc

* check cookie is auth'd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bridge-Feature-Request Request for a new bridge feature
Projects
None yet
Development

No branches or pull requests

4 participants