add author name
This commit is contained in:
parent
dc0fd0c781
commit
d96d38e508
@ -117,7 +117,7 @@ if __name__ == '__main__':
|
|||||||
print("Article ajoute : {0}".format(result["title"]["raw"]))
|
print("Article ajoute : {0}".format(result["title"]["raw"]))
|
||||||
print(comment_post)
|
print(comment_post)
|
||||||
for i in comment_post:
|
for i in comment_post:
|
||||||
data = {"post": result["id"], "content": i["content"], "date": i["date"]}
|
data = {"post": result["id"], "content": i["content"], "date": i["date"], "author_name": i["author"]}
|
||||||
page = requests.post("http://localhost:8080/wp-json/wp/v2/comments", auth=basic, data=data)
|
page = requests.post("http://localhost:8080/wp-json/wp/v2/comments", auth=basic, data=data)
|
||||||
print(page.status_code)
|
print(page.status_code)
|
||||||
if page.status_code == 201:
|
if page.status_code == 201:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user