ExpandUrl : API service to find redirects

Post your questions and help other users.

Moderator: Martin

Post Reply
BoBo
Posts: 129
Joined: 05 May 2014 12:45

ExpandUrl : API service to find redirects

Post by BoBo » 29 Mar 2020 16:29

Fellow AHK'er SKAN has provided a script that can be easily 'converted' into an Automagic flow.

a) take URL/URI from {clipboard}
b) validate if it's a URL/URI (regex ! not working properly!! Any (JAVA) regex god to the rescue?)
c) if true - request expandurl.com to convert the URL/URI (if its shortened) and copy its response to {clipboard}
d) if false - display a notification

[SKAN's AHK script]
Attachments
ExpandURL.xml
(4.84 KiB) Downloaded 737 times

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: ExpandUrl : API service to find redirects

Post by anuraag » 29 Mar 2020 16:47

Use following code to find url from clipboard

Code: Select all

find = findAll(value, getJavaStaticField("android.util.Patterns", "WEB_URL")); 
url = find[0];

BoBo
Posts: 129
Joined: 05 May 2014 12:45

Re: ExpandUrl : API service to find redirects

Post by BoBo » 29 Mar 2020 17:33

Thx :) much appreciated (... and for those who struggle with regex like myself: https://www.youtube.com/watch?v=r6I-Ahc ... zqdqHd2HiD)

Post Reply