This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# This Python script will | |
# | |
# - Log into a WordPress installation using supplied credentials. | |
# - Get a single published post using the REST call /wp/v2/posts | |
# - Get a valid nonce from '/wp-admin/post.php?post=xxx&action=edit' | |
# - Use cookie+nonce to retrieve on post in draft status via REST. | |
# | |
# Getting that valid nonce must be performed prior to each WP REST call |