@@ -2762,24 +2762,24 @@ def get_atl_request(url: str):
2762
2762
+ space_key
2763
2763
)
2764
2764
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
+ )
2768
2772
elif export_type == "html" :
2769
2773
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 } " ),
2773
2775
"exportType" : "TYPE_HTML" ,
2774
2776
"contentOption" : "visibleOnly" ,
2775
2777
"includeComments" : "true" ,
2776
2778
"confirm" : "Export" ,
2777
2779
}
2778
2780
elif export_type == "xml" :
2779
2781
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 } " ),
2783
2783
"exportType" : "TYPE_XML" ,
2784
2784
"contentOption" : "all" ,
2785
2785
"includeComments" : "true" ,
@@ -2791,9 +2791,7 @@ def get_atl_request(url: str):
2791
2791
return self .get_pdf_download_url_for_confluence_cloud (url )
2792
2792
else :
2793
2793
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 } " )
2797
2795
2798
2796
# Sending a POST request that triggers the space export.
2799
2797
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):
3103
3101
log .debug ("Extract task results to download PDF." )
3104
3102
task_result_url = progress_response .get ("result" )
3105
3103
else :
3106
- log .info (
3107
- f"{ percentage_complete } % - { task_state } "
3108
- )
3104
+ log .info (f"{ percentage_complete } % - { task_state } " )
3109
3105
time .sleep (3 )
3110
3106
log .debug ("Task successfully done, querying the task result for the download url" )
3111
3107
# task result url starts with /wiki, remove it.
0 commit comments