Hello All,
This could be a newbie question. I am trying to use Python to read the page content using the following code. My Confluence instance is on-prem. Please advise why I am getting the KeyError.
from atlassian import Confluence
import os
from bs4 import BeautifulSoup
import pandas as pd
user = "name@confluence.mydomain.com"
api_key = os.environ["mytoken"]
server = "https://confluence.mydomain.com/whateverpage"
confluence = Confluence(url=server, username=user, password=api_key)
page = confluence.get_page_by_id(page_id=123456)
\Anaconda3\lib\os.py in __getitem__(self, key) 673 except KeyError: 674 # raise KeyError with the original key value --> 675 raise KeyError(key) from None 676 return self.decodevalue(value) 677
Take a look at this post. It provides more details on what you need to do: https://community.atlassian.com/t5/Confluence-questions/Confluence-API-How-get-page-content-with-Python/qaq-p/1459259
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.