2
\$\begingroup\$

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

\$\endgroup\$
  • 3
    \$\begingroup\$ Interesting 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. \$\endgroup\$ – caird coinheringaahing Mar 16 '18 at 16:09
  • \$\begingroup\$ How does this challenge make sense in the context of this standard loophole? \$\endgroup\$ – Nit Mar 16 '18 at 17:29
  • 3
    \$\begingroup\$ I’ve casted my vote to close this question as a duplicate because it is a 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. \$\endgroup\$ – Mr. Xcoder Mar 16 '18 at 18:39
  • 2
    \$\begingroup\$ @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. \$\endgroup\$ – Shaggy Mar 16 '18 at 18:57
  • 3
    \$\begingroup\$ Awarded 1 time: DJMcMayhem \$\endgroup\$ – Jo King Apr 17 '18 at 10:58
1
\$\begingroup\$

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.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.