Commit 44ee6f9f authored by Alessandro CERIONI's avatar Alessandro CERIONI
Browse files

Preventing the content getter from getting authors information

parent 67af7ba4
......@@ -41,7 +41,7 @@ def get_content( cfg, the_content_type, the_content_id ):
headers['Authorization'] = 'Ghost %s' % jwt
# getting 1st page, in order to also know how many pages we have to go for...
res = requests.get( root_url + '/v2/admin/%s/%s?include=authors,tags&formats=html,plaintext' % (the_content_type, the_content_id), headers=headers )
res = requests.get( root_url + '/v2/admin/%s/%s?include=tags&formats=html,plaintext' % (the_content_type, the_content_id), headers=headers )
if res.status_code == 200:
return res.json()[the_content_type][0]
......@@ -72,7 +72,7 @@ def get_all_content_by_page( cfg, the_content_type, no_elements_per_page=10 ):
page_no = 1
# getting 1st page, in order to also know how many pages we have to go for...
res = requests.get( root_url + '/v2/admin/%s?include=authors,tags&formats=html,plaintext&limit=%i&page=%i'
res = requests.get( root_url + '/v2/admin/%s?include=tags&formats=html,plaintext&limit=%i&page=%i'
% (the_content_type, no_elements_per_page, page_no), headers=headers )
yield res.json()
......@@ -83,7 +83,7 @@ def get_all_content_by_page( cfg, the_content_type, no_elements_per_page=10 ):
page_no += 1
while page_no <= pages :
res = requests.get( root_url + '/v2/admin/%s?include=authors,tags&formats=html,plaintext&limit=%i&page=%i'
res = requests.get( root_url + '/v2/admin/%s?include=tags&formats=html,plaintext&limit=%i&page=%i'
% (the_content_type, no_elements_per_page, page_no), headers=headers )
#print(page_no, res.json()['meta'])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment