selfmade69 Posted February 22, 2020 Posted February 22, 2020 (edited) Yo I need some quick help about building this workflow. Assuming I have some content on my clipboard that contains: <p><a href="https://extreme-commerce.teachable.com/courses/392385/lectures/9786542?wvideo=kq8qkcou90"><img src="https://embed-ssl.wistia.com/deliveries/ebed1d02876b16bbe631160edc9168069bdd66c1.jpg?image_crop_resized=800x432.5&image_play_button_size=2x&image_play_button=1&image_play_button_color=09A59Ae0" width="400" height="216.25" style="width: 400px; height: 216.25px;"></a></p><p><a href="https://extreme-commerce.teachable.com/courses/392385/lectures/9786542?wvideo=kq8qkcou90">How to add and use product hunting tools | Extreme Commerce</a></p> I would like alfred to get the video ID that is "kq8qkcou90" in the above string (all the other parts are dynamic before wvideo= and after "> so I am guessing the script should somehow filter the rest of the string. After doing that the script should place it under this string: youtube-dl http://fast.wistia.net/embed/iframe/kq8qkcou90 and pass it to terminal. Any help would be appreciated. P.S. I tried to do this way but it didn’t help: Edited February 22, 2020 by selfmade69
selfmade69 Posted February 22, 2020 Author Posted February 22, 2020 Oh well after fiddling around some more I used double regex filters: And voilà Alfred is one hell of a beast
deanishe Posted February 22, 2020 Posted February 22, 2020 You don't need double filters: you can use regular expression groups. You want something like Replace .+wvideo=([^"]+)" with http://fast.wistia.net/embed/iframe/$1 selfmade69 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now