2016-08-13 78 views

回答

0

這是我得到的最接近:

curl 'https://www.tumblr.com/svc/account/register' --data 'user%5Bemail%[email protected]&tumblelog%5Bname%5D=USERNAMETOCHECK&form_key=!1231473848212%7CKpTkShMIsrNRL3V1GPCfNlpw6V8&action=signup_account' 

但是:

  • 它不是一個公共API,讓你的IP可能被阻止或它可能只是停止,恕不另行通知工作。
  • form_key參數可能會在一段時間後過期;你應該能夠解析從https://www.tumblr.com/得到一個新的。

注:

  • 我發現在Chrome的開發者工具註冊屏幕這個請求,「複製它作爲CURL」,並刪除了不必要的一切。
  • [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,可能做同樣的事情之一。

相關問題