Has anyone found a way to extract References using apple script from Apple News publications?
I am looking for a starting point.
Extracting References from Apple News
Re: Extracting References from Apple News
I have only been able to get the articles from Apple News into Safari with this crappy little script. Then you can run the script written by by Matthias Steffens.
NOTE: not all Apple News content can be opened in Safari. Some of the content will display/hide the main body of the article when opened in Safari. This dowoesn;t matter since the metadata is still there embedded into the pages code.
NOTE: not all Apple News content can be opened in Safari. Some of the content will display/hide the main body of the article when opened in Safari. This dowoesn;t matter since the metadata is still there embedded into the pages code.
Code: Select all
tell application "News"
activate
delay 0.5 -- allows time for the app to come to the front
end tell
tell application "System Events"
tell process "News"
click menu item "Copy Link" of menu "Edit" of menu bar 1 -- select the "Copy Link" option
end tell
end tell
delay 1 -- wait for the clipboard contents to be copied
set clipboardContents to (the clipboard as text) -- retrieve clipboard contents
tell application "Safari"
activate
delay 0.5
make new document with properties {URL:clipboardContents} -- open new tab with the clipboard URL
end tell