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

Actually fetching the artworks from Pixiv is very slow #89

Open
yellowbluesky opened this issue Apr 1, 2020 · 10 comments
Open

Actually fetching the artworks from Pixiv is very slow #89

yellowbluesky opened this issue Apr 1, 2020 · 10 comments
Labels
bug Something isn't working

Comments

@yellowbluesky
Copy link
Owner

yellowbluesky commented Apr 1, 2020

It takes upwards of three minutes to fetch a single artwork. Slow on both wifi at home and on 4G

No hypotheses yet.

Could it to do with the API endpoints?

I don't think it's to do with a596ee1, as that affects only authenticated update modes, and it's slow even on ranking updates modes.

@yellowbluesky yellowbluesky added the bug Something isn't working label Apr 1, 2020
@yellowbluesky
Copy link
Owner Author

Problem resolved itself? I tested this last night, on both home wifi and 4G, speeds are normal

Will close this issue in a few days if problem does not reoccur

@yellowbluesky
Copy link
Owner Author

It appears to just have been a transient issue with Pixiv's network.

@Kyle2142
Copy link

As long as I've used this app, downloading has been very slow. Other plugins like danbooru download images at multiple megabytes per second, while this one seems to be less than 200KB/s most of the time.
Not sure what else I can tell you to help debugging

@yellowbluesky
Copy link
Owner Author

Hey Kyle,

The app works perfectly fine for me, with download speeds of up to 4 MB/s when downloading feed images. I'll take a look at the code again soon, it's been a while for me now, see if there's anything I can update

@Kyle2142
Copy link

Kyle2142 commented Dec 15, 2020 via email

@yellowbluesky
Copy link
Owner Author

yellowbluesky commented Dec 16, 2020

There's a good reason why my apps behaviour differs from danboorus or other Muzei sources

With most boorus, no particular authentication is required to download images. Thus the Danbooru Muzei source submits an image url for Muzei to download at its own leisure.

With Pixiv, you cannot access any image without certain fields in the HTTP header being set and present.

The referee field must be set to come from another Pixiv Web page, I use Daily Ranking. You can see this for yourself, attempting to directly open a Pixiv image url will result in an error. For example, opening this image https://i.pximg.net/img-original/img/2020/12/13/00/00/05/86261533_p0.jpg directly causes a 403 error, while opening the image from the artwork page is fine (right click on image and "Open image in new tab") https://www.pixiv.net/en/artworks/86261533

All the authenticated feed modes require an access token in the HTTP header.

There is no way to instruct Muzei to insert the correct referer and access tokens into the HTTP header, so my app downloads images by itself.

I'm at work right now, I'll get back to you with an answer for why no images get loaded for you

@Kyle2142
Copy link

Kyle2142 commented Dec 16, 2020 via email

@yellowbluesky
Copy link
Owner Author

I'll havew a squizz at James' app on the weekend.

@yellowbluesky yellowbluesky reopened this Dec 16, 2020
@rsmyst
Copy link

rsmyst commented Jul 4, 2022

Just droppin by to say that this issue is still present.
James' App downlads images very quickly but for whatever reason this source takes a long time or doesn't download at all

@misternem0
Copy link

I'm not certain if it is related, but I sometimes get partially downloaded images that are considered successful and used by Muzei for background art.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants