无需登录网站就可以获得Tumblr代币?

2024-09-18 15:22:21 发布

您现在位置:Python中文网/ 问答频道 /正文

我用的是PyTumblr。我有消费者密钥消费者机密,我试图请求访问令牌令牌机密

在pytumblr github页面上,他们说:

Two easy ways to get your credentials to are:

  1. The built-in interactive_console.py tool (if you already have a consumer key & secret)
  2. The Tumblr API console at https://api.tumblr.com/console

很好,但是interactive_console.py等待用户交互。基本上,它会将你发送到一个网页来自动调整你想要访问的Tumblr应用程序。在

如您所见: https://github.com/tumblr/pytumblr/blob/master/interactive_console.py

他们说:

# Redirect to authentication page
print '\nPlease go here and authorize:\n%s?oauth_token=%s' % (authorize_url, request_token['oauth_token'][0])
redirect_response = raw_input('Allow then paste the full redirect URL here:\n')

第二种方法是直接访问网站。在

我的问题是:有没有什么方法可以在不与网站交互的情况下获得令牌(只是通过编程)来自动调整它,然后再获取令牌?

谢谢你!在


Tags: thetopyhttpsgithubcomtokenhere