How to get note information from posts using python / tumblr api?

I am so confused by all these levels of dictons that I need to get through it would be easier if I just do it by scraping, however I assume that this is a good exercise for learning dictations and will be faster if I find out.

My code is as follows, where the assignment operator for cpostsreturns a value of 404:

import pytumblr

# Authenticate via OAuth
client = pytumblr.TumblrRestClient(
    'xxxxxxxxxxxxxxxxxxxxxxxxxxxx'
)

f = client.followers('blog.tumblr.com')

users = f['users']

names = [b['name'] for b in f['users']]
print names

cposts = client.posts(names[0], 'notes_info=True')

print (cposts)

But python api info says: client.posts ('codingjester', ** params) # receive posts for blog

and this SO post ( Getting more than 50 notes with the Tumblr API ) says you should use notes_info to get notes. But I do not know how to build it in python, and not make a URL.

, URL-, , python/tumblr api. , - .

+4
1

notes_info=True. True notes_info client posts(). 'notes_info=True' , pytumblr URL-, 404.

+1

Source: https://habr.com/ru/post/1616576/


All Articles