使用 Python API 在 Confluence 中复制包含图像的页面

问题描述

我正在尝试将页面复制到一个空间到另一个空间,包括附件。我使用此代码复制整个页面

#I want to easily copy a page from one space to another space
page_id = confluence.get_page_id("MARLENETES","NewMarlene(1)")
print(page_id)

# retrieve the page,including its content.
page_c = confluence.get_page_by_id(page_id,expand='body.storage')
#print(page_c)

# the body HTML
body = page_c['body']['storage']['value']
print(body)

parent_id = confluence.get_page_id("NB","halli2")

for i in range(1,2):
print('new test'.format(i))

# use the same above to retrieve the parent page's id.
confluence.create_page('MARLENETES','NewMarlene({})'.format(i),body,parent_id,type='page',representation='storage',editor='v2')
time.sleep(1)

但问题是页面中包含的任何图像都不会被复制。在stackoverflow中,我找到了这个答案:How to move Confluence pages along with the contents from one space to another using Python?

我不想接受它“对 Python 不起作用”。有人解决了吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)