2016-08-13 77 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,可能做同样的事情之一。

相关问题