DATA_MAINPATH = '/Users/shawleo/Desktop/ARK/Data' USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.106 Safari/537.36'
with open(path_ARKK_PDF, "wb") as f: for chunk in response.iter_content(chunk_size=512): f.write(chunk) response = requests.get(DATA_URL_ARKK_CSV, headers=theHeader, stream=True)
with open(path_ARKK_CSV, "wb") as f: for chunk in response.iter_content(chunk_size=512): f.write(chunk)
on run #判断日期,周日和周一不运行 set currentDay to weekday of (get current date) if currentDay ≠ Sunday and currentDay ≠ Monday then return true end if error number -128 #中止执行该workflow, end run
参考:
1 2 3 4
display dialog "Do you want to exit this workflow?" with icon note buttons {"Exit", "Continue"} if the button returned of the result is "Exit" then error number -128 end if