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

A uselessly small number of results are returned with the candidates_elected endpoint #2402

Open
Muzer opened this issue Jun 26, 2024 · 1 comment · May be fixed by #2409
Open

A uselessly small number of results are returned with the candidates_elected endpoint #2402

Muzer opened this issue Jun 26, 2024 · 1 comment · May be fixed by #2409

Comments

@Muzer
Copy link

Muzer commented Jun 26, 2024

Issue and Steps to Reproduce

I am trying to make a fairly simple script which will run throughout election day which will involve collecting the currently declared candidates. I have no need to wait for precise vote counts, therefore it seems I should be using the candidates_elected endpoint as I want up-to-the-minute data as the results are coming in.

  • There is no page_size argument to the candidates_elected endpoint
  • Only 10 results are returned, when there are 650 MPs
  • Attempting to query 65 pages in a short space of time results in 429 Too Many Requests errors

Screenshots

Expected

A page_size argument is provided, or the default page size is not tiny

Actual

The page size is tiny

Additional Details

  • Browser and version — wget and requests
  • Were you logged in? — no
@Muzer
Copy link
Author

Muzer commented Jun 26, 2024

Incidentally logging in does fix the 429 errors, but I really don't want to be completely hammering your site 65 times every minute or so when I could just do it once a minute...

@Muzer Muzer linked a pull request Jun 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant