Jump to content

ifvsvg

Member
  • Posts

    13
  • Joined

  • Last visited

Posts posted by ifvsvg

  1. 27 minutes ago, deanishe said:

     

    If Chrome accepts the URL, then you can pass it directly to Chrome by running:

     

    #!/bin/zsh
    /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome 'https://www.youxuan68.com/search.asp?keyword=%u5948%u5B66'

     

    But I don't think it will ever work with Open URL because Apple's libraries simply won't accept that URL. Try the following in an Xcode Swift Playground:

     

    import Foundation
    
    let URLs = [
        // test URL
        "https://www.alfredforum.com",
        // your invalid URL
        "https://www.youxuan68.com/search.asp?keyword=%u5948%u5B66",
        // properly URL-encoded
        "https://www.youxuan68.com/search.asp?keyword=%25u5948%25u5B66",
    ]
    
    for str in URLs {
        if URL(string: str) != nil {
            print("  valid: \(str)")
        } else {
            print("invalid: \(str)")
        }
    }

     

     

    /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome 'https://www.youxuan68.com/search.asp?keyword=%u5948%u5B66'

     

    Above command works, although it's not a perfect solution.

     

    Thanks!

  2. 1 hour ago, deanishe said:

     

    It's not judgement, it's fact. %uXXXX escaping is non-standard. Sure, Chrome may support it, but macOS doesn't.

     

     

    The standards are, and they say your URL is not valid.

     

     

    I already told you: fix the URL so it's valid.

     

    Chrome may accept it if you paste it directly into the browser, but macOS APIs will not accept your URL. Because it's not valid.

     

    I am not the developer of that site, I can not change the url.

     

    But I pay for alfred.

     

    Maybe,

    alfred can be compatile to this situation, for his paid user, like chrome?

  3. 6 hours ago, deanishe said:

     

    Alfred is encoding it because that's not a valid URL. You can't get Alfred to open that URL without it encoding the %-signs to make the URL valid, and I don't think macOS will do it either.

     

    You need to encode your URLs properly. %uXXXX escaping is not valid.

     

    I can open the URL in Chrome, why you judge the url is not valid?

     

    Alfred is more AUTHORITATIVE than Chrome?

     

     

    https://www.youxuan68.com/search.asp?keyword=%u5948%u5B66

     

    The URL is just here, anyone can tell me how to open it by alfred?

     

    Or Alfred is used to refuse customer‘s requirement by fictitious reason?

     

     

  4. I want to open following url in alfred with "Open URL ",

    https://www.youxuan68.com/search.asp?keyword=%u5948%u5B66

    but alfred ALWAYS urlencode it, and url become

    https://www.youxuan68.com/search.asp?keyword=%25u5948%25u5B66

    Which is the WRONG url.

     

    I also tried "Run Script Action" with

    open "https://www.youxuan68.com/search.asp?keyword=%u5948%u5B66"

    but I got 

    Unable to interpret 'https://www.youxuan68.com/search.asp?keyword=%u5948%u5B66' as a path or URL

     

     

    Who can help me, please.

     

    It really make me stuck.

  5. I suggest alfred support workflow auto download and auto update

     

    details as follows,

     

    * a config file, whose each item corresponding a workflow

    * each item contains: download addr(github addr)、current version get addr(github addr)、etc.

    * auto download, add a new item to the config file, then alfred auto download new workflow and install

    * auto update, alfred workflow check for update everyday and auto update background

     

    by this way, user could use workflow more conveniently.

×
×
  • Create New...