6 ms·
What are you using to determine whether *.io domains are "free" vs "taken"? It seems to be incorrect. http://www.usernique.com/io/x -- "free" http://www
by bdc 14y ago
What are you using to determine whether *.io domains are "free" vs "taken"? It seems to be incorrect.
http://www.usernique.com/io/x
-- "free"
http://www.nic.io/cgi-bin/whois?query=x.io
-- The domain is unavailable for use.
- trevorah 14y agojust checking the return code on a GET request. src is on github if you're curious. You're right though, looks like the domain lookups need a bit of work.
- rajivm 14y agoYou should do a "whois" lookup for the domain. The return code for a 'get' request on the domain has no bearing on its availability -- many parked domains do not even have DNS configured, let alone HTTP.
- cbhl 14y agoI'd be wary of doing automated whois lookups, which might be considered abusive / against terms of service depending on which server you hit.
- trevorah 14y agoGood point. This doesnt sound like a quick fix.
- trevorah 14y agoVery true. This requires a little more work than my current hack. I'll see if there is a whois package for node...
- nwh 14y agoThe quickest way I've found is to do a DNS lookup, and if that fails, hit the WHOIS.
- jschuur 14y agoLooks like there's some bugs here. Just claimed 'esi' was available on Twitter and GitHub, but it's not.
- cbhl 14y agoHmm. Judging from the way the server.js is written, I'd expect he's being rate-limited, and the server returns free whenever the HTTP call doesn't return 200. Edit: Just to be sure, I threw in a breakpoint on line 18 of generate.js, and set name to my username (cbhl) -- and got a false "free" result for both Twitter and GitHub. The OP might need to be getting OAuth tokens and using the GitHub/Twitter APIs.
- trevorah 14y agoAny tips to sort this out? How are things being rate limited? edit: just realised you meant that twitter/github etc are rate limiting my requests. Bummer.
- jschuur 14y agoJust hit the profile page URL and get the HTTP staus code. If https://twitter.com/ksdhbfslbflsdbs https://twitter.com/ksdhbfslbflsdbs returns 404, it's not available. Not quit the same (a username might be reserved internally), but either way, nobody else can use the name.
- trevorah 14y agoYep, thats pretty much how it works at the moment (see https://github.com/trevorah/usernique/blob/master/server.js https://github.com/trevorah/usernique/blob/master/server.js). The issue is that the server is sending out quite a few of these hits to twitter, and twitter is smart enough to start reject requests when things get a bit too much.
- nsp 14y agoI'm not a node guy, but I found this module for Whois checks - https://npmjs.org/package/whois-available https://npmjs.org/package/whois-available It uses the IANA Whois service, an admittedly cursory look doesn't turn up anything re: rate limits, but you could just do a get request on the root url and only check Whois if it 404s to be safe. http://www.iana.org/whois http://www.iana.org/whois
- mijustin 14y agoHere's another one: says "ece" is available. http://d.pr/i/fiRF http://d.pr/i/fiRF