This file contains hidden or 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
| import requests | |
| # https://stackoverflow.com/questions/48589954/can-i-use-the-rest-api-for-a-site-hosted-on-wordpress-com | |
| # https://developer.wordpress.com/docs/oauth2/ | |
| # https://developer.wordpress.com/apps/ | |
| access_token = requests.post("https://public-api.wordpress.com/oauth2/token", data={ | |
| 'client_id': <Redacted>, | |
| 'client_secret': '<Redacted>', | |
| 'grant_type': 'password', | |
| 'username': '<Redacted>', |
This file contains hidden or 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
| import subprocess | |
| import io | |
| import math | |
| import json | |
| accounts = ["<Mail address of the IA account>"] | |
| def convert_size(size_bytes): | |
| if size_bytes == 0: | |
| return "0B" |
OlderNewer