alphasp / pxview

An unofficial Pixiv app client for Android and iOS, built with React Native.
MIT License
753 stars 87 forks source link

Pxview doesn't detect shortlinks and desktop links #22

Open ghost opened 6 years ago

ghost commented 6 years ago

Generally I can open pixiv mobile links from another app inside pxview without problems but if the urls are in these formats:

the links open in my browser. The only format opened by pxview is this:

edit: I just noticed that sometime it asks me where do I want to open the link in, sometime it directly opens them in my browser

alphasp commented 6 years ago

How to get following url format: pixiv.me/username and pixiv.net/#id=???????? Sharing from desktop/mobile web is not in this format.

pixiv.me/username is not a valid user profile page, it will redirect to search username on pixiv site.

pixiv.net/#id=??????? will redirect to user profile page in this format on desktop browser: pixiv.net/member.php?id=???????? but not on mobile browser

pixiv.net/member.php?id=???????? should work fine, it is possible that your device is set to open pixiv link handle by another app, in that case, you can change open by default setting in your device app setting page

ghost commented 6 years ago

I found the first two patterns you mentioned on twitter profiles so I just assumed they were shortlinks accepted by pixiv.net. I also found a correlation between failed redirects and link position on a twitter profile. If a pixiv link in the pixiv.net/member.php?id=???????? format is contained in a twitter biography it is correctly redirected into pxview, on the other hand if said format or other formats are contained in the website form of your profile it opens the link in the browser completely ignoring the pxview preference in handling pixiv.net links. I should also mention that I am not using the official twitter client but Fenix

alphasp commented 6 years ago

Mistake in my previous comment: pixiv.me/username will redirect to user profile page in the format of pixiv.net/member.php?id=???????? which can be open by app.

So the following pattern will work: pixiv.me/username pixiv.net/member.php?id=????????

If you open pixiv link from client like twitter, twitter by default will open the link via Chrome Custom Tabs, to make the deep link work, you will need to tap menu to open with browser

ghost commented 6 years ago

I don't know if Fenix behaves as the official Twitter client but the same link in the same format into the biography/description area of a twitter profile redirects to pxview, when said link is in the webpage form instead it opens into the browser ignoring link handlings. I think this is a Fenix's issue but I wanted to confirm it here first

twitter

Lucidiot commented 5 years ago

URLs in the member_illust.php?id=... can be opened in PxView but they will lead to a blank screen or a crash.