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

URRS: undel-pls requests don't show number of undelete votes #210

Open
blackgreen100 opened this issue Jun 5, 2022 · 1 comment
Open

Comments

@blackgreen100
Copy link

blackgreen100 commented Jun 5, 2022

Unlike other *-pls requests, undel-pls ones do not show the number of undelete votes on deleted posts, instead it only shows deleted. In case of undel-pls this display is not particularly helpful — although in case of a completed request, i.e. post successfully undeleted, the deleted suffix would presumably disappear.

See below screenshot:

img

Current available solution seems to scrape the page of the deleted post to obtain number of undelete votes. It would be available to 10k+ users only.

Possible display:

u:(2)

Possible display in case of users without necessary privilege level:

N.A.

@makyen
Copy link
Contributor

makyen commented Mar 4, 2023

The URRS uses the SE API to get data about posts. The SE API provides almost no information about deleted posts, so the URRS isn't able to obtain the number of undelete votes from the SE API. As mentioned in the original comment here, it would be necessary to get the data in another manner.

A better alternative to fetching multiple individual question pages would be to obtain the HTML for the posts from the SE-internal /posts/ajax-load-realtime/${list of semicolon delimited post IDs} endpoint, which allows getting the HTML for a substantial number of individual posts in a single AJAX call. As with the question pages, data for deleted posts is only returned from the realtime posts endpoint for users with the view deleted posts privilege. Both of these methods of getting data provide the HTML for the page or post, which would then need to be parsed to scrape the number of undelete votes.

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

No branches or pull requests

3 participants