File size: 547 Bytes
56d74b6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # coding=utf-8
from atlassian import Confluence
"""This example shows how to export pages"""
confluence = Confluence(
url="https://test.atlassian.net/wiki",
username="admin",
password="api-key",
api_version="cloud",
)
if __name__ == "__main__":
space = "TEST"
page_title = "Test"
page_id = confluence.get_page_id(space, page_title)
content = confluence.export_page(page_id)
with open(page_title + ".pdf", "wb") as pdf_file:
pdf_file.write(content)
pdf_file.close()
print("Completed")
|