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

[Tumblr] Tumblr official API bug would cause posts being skipped in pagination #5880

Closed
fireattack opened this issue Jul 23, 2024 · 4 comments

Comments

@fireattack
Copy link
Contributor

fireattack commented Jul 23, 2024

Tumblr official API has a serious bug (tumblr/docs#76) where if some posts have same "user-set publish time" (according to their employee), using the next link returned by the API for pagination would actually skip some posts. See the original issue for a still-valid example.

And they refused to fix it.

I see gdl uses this API endpoint and data["_links"]["next"]["href"], so I think I should share this as a PSA.

To workaround this issue, you can use offset param instead of using the href provided by the API itself. (Actually, the API used to just return new href with changed offset, before they switched to the current page_number hash fashion.)

Or use before calculated based on posts fetched from the previous call, but make sure to include some overlapping. Because as said above, some posts would have the exactly same timestamp due to being scheduled.

@fireattack fireattack changed the title [Tumblr] Tumblr official API bug would cause posts being missed. [Tumblr] Tumblr official API bug would cause posts being skipped when pagination Jul 23, 2024
@fireattack fireattack changed the title [Tumblr] Tumblr official API bug would cause posts being skipped when pagination [Tumblr] Tumblr official API bug would cause posts being skipped in pagination Jul 23, 2024
@mikf
Copy link
Owner

mikf commented Jul 23, 2024

#5810 might be related. At the very least it is a case where using data["_links"]["next"]["href"] doesn't work and stops after the first page of results, so it would also need a different pagination strategy.

mikf added a commit that referenced this issue Jul 23, 2024
restore pagination behavior from before
de670bd
@mikf
Copy link
Owner

mikf commented Jul 23, 2024

I made an attempt: 540eaa5

@Hrxn
Copy link
Contributor

Hrxn commented Jul 30, 2024

@fireattack Can you still reproduce this issue with 540eaa5?

@fireattack
Copy link
Contributor Author

I didn't try; but by the look of it it should have solved it. Closing.

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

No branches or pull requests

3 participants