Jump to content

Triplex79

Member
  • Posts

    9
  • Joined

  • Last visited

Posts posted by Triplex79

  1. 15 hours ago, vitor said:

    I feel like there’s some information we’re not getting. As in, why would the URLs redirect? Why can’t you just include the URLs in their final form to begin with?

     

    Either way, try this Workflow. It should do what you want.

     

    It works by first making a web request and getting the final redirect, and only then opening them in the browser (makes double the web requests, but is way easier to build than the other way around). It will copy all URLs to the clipboard separated by newlines. If you want to change the URLs, open the Run Script and change the starting lines in quotes (lines 2–4). Keep the same pattern: in double quotes, and use ${1} for the place where your query will be substituted.

     

    Exactly what i wanted!

    Really cool 🙂

     

    It works perfectly, thank you very much!

  2. 4 minutes ago, deanishe said:

     

    So you don't actually want to open them in a browser? You just want to resolve any redirects and copy the canonical URLs to the clipboard?

     

    You can resolve redirects with the following Python code:

    
    from urllib2 import urlopen
    
    # URL to resolve
    url = 'http://www.google.com'
    
    r = urlopen(url)
    
    # URL after any redirects
    newurl = r.geturl()

     

    Of course i open them like in the screenshot above in the browser. 

     

    1. I use a keyword that replace the query variable {query} execute a search

    2. 3 tabs will open with different URLS all the same query in it - same like the movie search template in workflows Alfred already offer

    3. Now i want that Alfred copy all URL's to my clipboard like i wrote above 

     

  3. 1 hour ago, deanishe said:

     

    Why? What are you trying to achieve? It’s easier to resolve URLs redirects in code than trying to get them from browser tabs that may or may not have finished loading yet. 

    I want to get copied all URLS after the redirect to my clipbloard like:

     

    http://www.domain1.com/

    http://www.domain2.com/

    http://www.domain3.com/

     

    But exactly like they are after the redirect (if any apply)

     

    And then i have the URLS in my clipboard. 

     

  4. native tongue is German.

    But English is not a problem usually. 

     

    I contacted the support already, he did understood me :D

     

    Party i was already some steps closer. But still something is missing.

     

    O.K. requirements are:

     

    1. I open with a keyword and a {query} and the same query will open three pages like in the standard workflow to see
    2. image.png.c8380e00bd4b35daf5375652c9178eb1.png
    3. What now is missing for me, i need Alfred copy the final URL that is stated in the browser URL bar for all websites (after possible redirects)

    Do you know a script how i may accomplish that?

     

    Thank you in advance!

  5. Hello together,

     

    1. i am totally new to workflows. I think what i want achieve, i could do with workflows. But i don't know how to accomplish that.

    I want to open with one {query} -> already what i use -> for instance Google Maps search -> open multiple pages.

     

    How is that possible?

     

    2. How is it possible in addition top copy (to the clipboard) the opened URL's -> we opened through the workflow? All three at once, in case there are three

    URLs that should be opened.

     

    Thank you very much for your help!

     

    EDIT/Solution: If somebody face the same problem, Vitor had for me the solution created

    Thank you very much again Vitor!

     

×
×
  • Create New...