I recently wrote a script that looks up and opens links. It opens them in DEVONthink, so I made a version for you. Select your link(s), or the whole page, run the script and it will open them in the default app.
It uses macOS System Events
to copy selected text so it may be that you have to increase the delay if you use it via shortcut (e.g. via Alfred or Keyboard Maestro) as there’s a chance that once in a while you don’t let your triggering shortcut go fast enough which will let macOS register your shortcut plus the shortcut System Events
presses. However waiting 0.5 (or more) seconds should be no problem if you don’t have to open and close all those DEVONthink windows. If you use it via DEVONthink’s menu or toolbar that’s of course no issue.
-- Open selected text's link(s) in default app
property theDelay : 0.5
tell application id "DNtp"
try
set theWindow to think window 1
try
set selectedText to selected text of theWindow & "" as string
delay theDelay
activate
tell application "System Events" to tell process "DEVONthink 3" to keystroke "c" using {command down}
try
set theGrepResults to do shell script "osascript -e 'the clipboard as «class RTF »' | perl -ne 'print chr foreach unpack(\"C*\",pack(\"H*\",substr($_,11,-3)))' | egrep -o 'x-devonthink-item[^\"]*'" -- https://superuser.com/a/1409995/
on error
display alert "No link(s) found" buttons {"Ok"} default button 1 message "" as critical
return
end try
set theRefURLs to paragraphs of theGrepResults
on error
display alert "No text selected" buttons {"Ok"} default button 1 message "" as critical
return
end try
repeat with thisRefURL in theRefURLs
set thisPath to path of (get record with uuid ((characters 21 thru -1 in thisRefURL) as string))
tell application "Finder" to open file (POSIX file thisPath as alias)
end repeat
on error error_message number error_number
if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
end try
end tell