@@ -2762,24 +2762,24 @@ def get_atl_request(url: str):
27622762 + space_key
27632763 )
27642764 if export_type == "csv" :
2765- form_data = dict (atl_token = get_atl_request (
2766- f"spaces/exportspacecsv.action?key={ space_key } "
2767- ), exportType = "TYPE_CSV" , contentOption = "all" , includeComments = "true" , confirm = "Export" )
2765+ form_data = dict (
2766+ atl_token = get_atl_request (f"spaces/exportspacecsv.action?key={ space_key } " ),
2767+ exportType = "TYPE_CSV" ,
2768+ contentOption = "all" ,
2769+ includeComments = "true" ,
2770+ confirm = "Export" ,
2771+ )
27682772 elif export_type == "html" :
27692773 form_data = {
2770- "atl_token" : get_atl_request (
2771- f"spaces/exportspacehtml.action?key={ space_key } "
2772- ),
2774+ "atl_token" : get_atl_request (f"spaces/exportspacehtml.action?key={ space_key } " ),
27732775 "exportType" : "TYPE_HTML" ,
27742776 "contentOption" : "visibleOnly" ,
27752777 "includeComments" : "true" ,
27762778 "confirm" : "Export" ,
27772779 }
27782780 elif export_type == "xml" :
27792781 form_data = {
2780- "atl_token" : get_atl_request (
2781- f"spaces/exportspacexml.action?key={ space_key } "
2782- ),
2782+ "atl_token" : get_atl_request (f"spaces/exportspacexml.action?key={ space_key } " ),
27832783 "exportType" : "TYPE_XML" ,
27842784 "contentOption" : "all" ,
27852785 "includeComments" : "true" ,
@@ -2791,9 +2791,7 @@ def get_atl_request(url: str):
27912791 return self .get_pdf_download_url_for_confluence_cloud (url )
27922792 else :
27932793 raise ValueError ("Invalid export_type parameter value. Valid values are: 'html/csv/xml/pdf'" )
2794- url = self .url_joiner (
2795- url = self .url , path = f"spaces/doexportspace.action?key={ space_key } "
2796- )
2794+ url = self .url_joiner (url = self .url , path = f"spaces/doexportspace.action?key={ space_key } " )
27972795
27982796 # Sending a POST request that triggers the space export.
27992797 response = self .session .post (url , headers = self .form_token_headers , data = form_data )
@@ -3103,9 +3101,7 @@ def get_pdf_download_url_for_confluence_cloud(self, url):
31033101 log .debug ("Extract task results to download PDF." )
31043102 task_result_url = progress_response .get ("result" )
31053103 else :
3106- log .info (
3107- f"{ percentage_complete } % - { task_state } "
3108- )
3104+ log .info (f"{ percentage_complete } % - { task_state } " )
31093105 time .sleep (3 )
31103106 log .debug ("Task successfully done, querying the task result for the download url" )
31113107 # task result url starts with /wiki, remove it.
0 commit comments