Trouble getting a final link from archive.today

I’m trying to create a Shortcut to get a true permanent link for any webpage.

If the page is currently on WaybayMachine I can get the most recent archive link.

I’m having trouble with situations where the page is NOT on WB machine and might prohibit WB archives.

http://archive.today would meet the requirement but I’m having trouble extracting the link.

I’d like to execute the POST and then get the final url, I think.

Any ideas? I’ve attached a sample shortcut to show what I’ve got so far.

I’m not married to archive.today, so if there’s a better resource I’ll joyously switch. :wink:

https://www.icloud.com/shortcuts/75dbbb1ce7b84d0aa0c79232321d47ff

Take a look at this Shortcut. I added a Match Text action to match the short url format of archive.today and then copy the URL to the clipboard. I found I have to run it twice on a new link. I am unsure exactly why at this point, but you might be able to troubleshoot it more.

Archive.today Shortcut

I’ll ponder and dig on this.

It might not be elegant, but working hacks >> beautifully broken.