Race for the Steward Badge

2

Backstory

If you visit the Steward Badge Page, you will see no one has received one of these badges from PPCG yet. However, there are two users: DJMcMayhem & Martin Ender , that are only a few reviews away from this badge!

Challenge

Your challenge, is to write a program or function that when run, outputs DJMcMayhem's review count from the Low Quality reviews & Martin Ender's review count from First Posts reviews.

Your code needs to be dynamic so you should not hard-code the values of the current count. You should actually go and fetch the counts from those pages.

Your output should be the users name and the count, with some delimiter in between each value, and there is no input.

Examples

DJMcMayhem, Count] [Martin Ender, Count]

DJMcMayhem, Count, Martin Ender, Count

DJMcMayhem Count Martin Ender Count

DJMcMayhem
Count
Martin Ender
Count

etc.....

No extraneous info is allowed.

Rules

Standard loopholes are not allowed.

This is , so the shortest code in bytes for each language wins!

Sandbox post

DevelopingDeveloper

Posted 2018-03-16T16:07:03.963

Reputation: 1 415

3Interesting challenge. Just a heads up, 22 hours in the Sandbox is quite short. The recommended time is 72 hours, so that many people can see and offer criticism. – caird coinheringaahing – 2018-03-16T16:09:44.777

How does this challenge make sense in the context of this standard loophole?

– Nit – 2018-03-16T17:29:02.737

@Nit standard loopholes don’t have to be disallowed – dylnan – 2018-03-16T18:29:53.453

3I’ve casted my vote to close this question as a duplicate because it is a [tag:stack-exchange-api] challenge involving and comparing 2 users, just like the other challenge. In my opinion, the only difference is looking at a badge progess rather than the reputation, and moreover the post I linked to has looser I/O rules. – Mr. Xcoder – 2018-03-16T18:39:41.410

2@Mr.Xcoder, I looked for reviews in the API but couldn't find them so I'd argue against that dupe target. We have had a couple of challenges that required scraping data from an SE page, though; one of those would probably be a better target. – Shaggy – 2018-03-16T18:57:40.303

Very related; potentially duplicate. Also requires scraping an SE webpage (though with ID input not hardcode). I can't vote though because it is binding. – HyperNeutrino – 2018-03-17T02:40:15.790

@dylnan Yeah, but the challenge text says all of them are disallowed. – Nit – 2018-03-17T09:10:56.497

3Awarded 1 time: DJMcMayhem – Jo King – 2018-04-17T10:58:32.180

Answers

1

Red, 259 bytes

c:"https://codegolf.stackexchange.com/review/"t: copy c
d:"low-quality-posts/stats"e:"first-posts/stats"
f: func[s q][parse find s q[thru{-count">^M^/}any" "copy n to" "(print[q n])]]
f read to-url append c d"DJMcMayhem"
f read to-url append t e"Martin Ender"

Try it online!

Unfortunately doesn't work in TIO - results in timeout, although works normally in Red console.

Galen Ivanov

Posted 2018-03-16T16:07:03.963

Reputation: 13 815