我想将一堆网页另存为单独的.txt文件。我有一个.txt文件,其中包含列表形式的URL。
我在网上找到了以下小程序来打开URL。但是如何将每个网页另存为.txt文件。如果可能的话,我还要为每个文件命名URL的HTML标题。
set urlFile to (path to desktop as text) & "urls.txt" as alias
set urList to (read urlFile as «class utf8» using delimiter linefeed) as list
tell application "Safari"
activate
repeat with aURL in urList
open location aURL
end repeat
end tell
return
我希望有人能帮助我。谢谢!