@@ -1402,7 +1402,7 @@ def attach_file(
14021402
14031403 def download_attachments_from_page (self , page_id , path = None , start = 0 , limit = 50 , filename = None , to_memory = False ):
14041404 """
1405- Downloads attachments from a Confluence page. Supports downloading all files or a specific file.
1405+ Downloads attachments from a Confluence page. Supports downloading all files or a specific file.
14061406 Files can either be saved to disk or returned as BytesIO objects for in-memory handling.
14071407
14081408 :param page_id: str
@@ -2749,23 +2749,29 @@ def get_atl_request(url: str):
27492749 )
27502750 if export_type == "csv" :
27512751 form_data = {
2752- "atl_token" : get_atl_request ("spaces/exportspacecsv.action?key={space_key}" .format (space_key = space_key )),
2752+ "atl_token" : get_atl_request (
2753+ "spaces/exportspacecsv.action?key={space_key}" .format (space_key = space_key )
2754+ ),
27532755 "exportType" : "TYPE_CSV" ,
27542756 "contentOption" : "all" ,
27552757 "includeComments" : "true" ,
27562758 "confirm" : "Export" ,
27572759 }
27582760 elif export_type == "html" :
27592761 form_data = {
2760- "atl_token" : get_atl_request ("spaces/exportspacehtml.action?key={space_key}" .format (space_key = space_key )),
2762+ "atl_token" : get_atl_request (
2763+ "spaces/exportspacehtml.action?key={space_key}" .format (space_key = space_key )
2764+ ),
27612765 "exportType" : "TYPE_HTML" ,
27622766 "contentOption" : "visibleOnly" ,
27632767 "includeComments" : "true" ,
27642768 "confirm" : "Export" ,
27652769 }
27662770 elif export_type == "xml" :
27672771 form_data = {
2768- "atl_token" : get_atl_request ("spaces/exportspacexml.action?key={space_key}" .format (space_key = space_key )),
2772+ "atl_token" : get_atl_request (
2773+ "spaces/exportspacexml.action?key={space_key}" .format (space_key = space_key )
2774+ ),
27692775 "exportType" : "TYPE_XML" ,
27702776 "contentOption" : "all" ,
27712777 "includeComments" : "true" ,
@@ -2777,7 +2783,9 @@ def get_atl_request(url: str):
27772783 return self .get_pdf_download_url_for_confluence_cloud (url )
27782784 else :
27792785 raise ValueError ("Invalid export_type parameter value. Valid values are: 'html/csv/xml/pdf'" )
2780- url = self .url_joiner (url = self .url , path = "spaces/doexportspace.action?key={space_key}" .format (space_key = space_key ))
2786+ url = self .url_joiner (
2787+ url = self .url , path = "spaces/doexportspace.action?key={space_key}" .format (space_key = space_key )
2788+ )
27812789
27822790 # Sending a POST request that triggers the space export.
27832791 response = self .session .post (url , headers = self .form_token_headers , data = form_data )
0 commit comments