0
有什麼辦法檢查用戶名可用性爲tumblr?我想檢查用戶名是否可用於在tumblr上註冊。如何以編程方式檢查Tumblr用戶名可用性?
我試着檢查像username.tumblr.com這樣的網址的HTTP響應,但是返回404的網址仍然無法註冊。任何想法? 謝謝!
有什麼辦法檢查用戶名可用性爲tumblr?我想檢查用戶名是否可用於在tumblr上註冊。如何以編程方式檢查Tumblr用戶名可用性?
我試着檢查像username.tumblr.com這樣的網址的HTTP響應,但是返回404的網址仍然無法註冊。任何想法? 謝謝!
這是我得到的最接近:
curl 'https://www.tumblr.com/svc/account/register' --data 'user%5Bemail%[email protected]&tumblelog%5Bname%5D=USERNAMETOCHECK&form_key=!1231473848212%7CKpTkShMIsrNRL3V1GPCfNlpw6V8&action=signup_account'
但是:
form_key
參數可能會在一段時間後過期;你應該能夠解析從https://www.tumblr.com/
得到一個新的。注:
[email protected]
只是我能想到的最短的未使用電子郵件地址。的迴應將是這樣的:
{
"redirect": false,
"redirect_method": "GET",
"errors": [
"Someone beat you to that username.",
"You forgot to enter your password!"
],
"signup_success": false,
"next_view": false,
"usernames": [
"..."
]
}
如果Someone beat you to that username.
出現在錯誤,那麼用戶名取。
你的替代方案是用many services and APIs,可能做同樣的事情之一。