Have you ever found a good challenge to answer, answered it and then found out somebody posted a solution with a better score in the same language?
Challenge
Write a program/function that takes a PPCG question ID and outputs a leaderboard.
A leaderboard consists of the rank, the language, the score, the author and the URL of each answer. This can be output as a newline delimited string, a list of strings, a "dictionary", etc..
- Rank
- The rank of an answer is its position in the score hierarchy (lowest first).
- Answers with shared scores must have the same rank.
- Language
- The name of the language is always between the last
#
on the first line and the first,
. - It may be a link to documentation, which must be handled by taking the user-facing text.
- The name of the language is always between the last
- Score
- The score of a answer is the last number on the first line.
- It may be a decimal number.
- Author
- The author of an answer is the display name of the user that posted it.
- URL
- The URL of an answer will go straight to the answer.
- URL shorteners are disallowed.
Specifications
- Standard I/O rules apply.
- Standard loopholes are forbidden.
- This challenge is not about finding the shortest approach in all languages, rather, it is about finding the shortest approach in each language.
- Your code will be scored in bytes, usually in the encoding UTF-8, unless specified otherwise.
- Explanations, even for "practical" languages, are encouraged.
Test cases
Note that these show example output formats which need not be strictly followed. These examples were taken at the time of sandboxing, they might be outdated.
Input: 28821
1. PCRE flavor, score 40 by jimmy23013 (https://codegolf.stackexchange.com/a/31863)
Input: 92944
1. Jelly, score 12 by Dennis (https://codegolf.stackexchange.com/a/92958)
2. Befunge-98, score 38 by Hactar (https://codegolf.stackexchange.com/a/98334)
3. ><>, score 41 by Sp3000 (https://codegolf.stackexchange.com/a/92980)
4. TovTovTov, score 810147050 by Yaniv (https://codegolf.stackexchange.com/a/93048)
Input: 47604*
1. Pyth, score 28.08 by Jakube (https://codegolf.stackexchange.com/a/47642)
2. APL, score 39.6 by jimmy23013 (https://codegolf.stackexchange.com/a/47606)
Input: 133793
1. Lua, score 9.06 by TehPers (https://codegolf.stackexchange.com/a/135775)
2. C# (.NET Core), score 10.20 by Kamil Drakari (https://codegolf.stackexchange.com/a/135764)
3. Cubically, score 86.98 by Kamil Drakari (https://codegolf.stackexchange.com/a/137695)
*Note that this challenge has 3 answers, however the GolfScript answer doesn't have a comma in the header which makes it undefined behaviour.
In a few better formats:
28821, 92944, 47604, 133793
28821 92944 47604 133793
28821
92944
47604
133793