13
Challenge
The challenge is simple, using http://isup.me, determine whether an inputted website is up or down.
If the site is up, you should return a truthy value and if the site is down, you should return a falsey value.
Rules
The input will be a web address such as stackexchange.com
or google.co.uk
. The input will never have http://
, https://
etc. at the start of the string, but may have www.
or codegolf.
at start etc.
You should use the site isup.me/URL
where URL is the input.
When a site is up, it will look like:
http://isup.me/codegolf.stackexchange.com
If a site is down, it will look like:
URL shorteners are disallowed apart from isup.me.
Example inputs
Probably up (depending on current circumstances):
google.de
codegolf.stackexchange.com
worldbuilding.meta.stackexchange.com
tio.run
store.nascar.com
isup.me
Will be down:
made.up.com
fake.com.us
why.why.why.delilah
store.antarcticrhubarbassociation.an
Winning
Shortest code in bytes wins.
If URL shorteners aren't allowed, should we use downforeveryoneorjustme.com or isup.me ? – Conor O'Brien – 2017-07-02T22:49:23.937
@ConorO'Brien No, I'll make an exception for isup.me – Beta Decay – 2017-07-02T22:50:22.077
21By the way: "made.up.co.uk" is actually up. – GiantTree – 2017-07-02T23:40:46.637
@GiantTree Hmm... technically up but doesn't exist. – Erik the Outgolfer – 2017-07-03T08:50:25.470
1@EriktheOutgolfer Irrelevant – Pierre Arlaud – 2017-07-03T08:56:59.517
8I've just registered
fake.com.us
to mess with your test cases! – YSC – 2017-07-03T09:18:18.653@PierreArlaud I mean, it's just a registrar page. – Erik the Outgolfer – 2017-07-03T10:33:49.623
@Erik isup.me still registers it as up though – Beta Decay – 2017-07-03T10:35:53.717
14But what if
isup.me
is down? – Okx – 2017-07-03T12:01:08.9302@Oks Are you sure it's not just you? – Pierre Arlaud – 2017-07-03T13:05:09.547
3Recommended test case:
isup.me
. It returns a result other than what, say,google.com
may return. – Okx – 2017-07-03T14:02:50.700@Okx Thanks, that's a good one – Beta Decay – 2017-07-03T14:40:11.127
I have just notified Tom Jones. He's shouting at his agent right now. – Wossname – 2017-07-03T16:59:33.987
mabye add a test case for something like
qweasdzxc
with no.tld
- returns different results. I'd say answers should only need to take valid web addresses into account though.. – colsw – 2017-07-05T08:44:27.070