Jump to content

FreeeG

Member
  • Posts

    3
  • Joined

  • Last visited

Reputation Activity

  1. Like
    FreeeG reacted to vitor in Create a custom http search query with Alfred app   
    Doesn’t look like it. It includes an sid (session ID) with each request, which is something I’ve found in phpBB forums. Nulled uses Invision Power Board, same as the Alfred forums.

    I’ve tried to programatically get the search query URLs for a phpBB board in the past and it was such a pain I abandoned the effort. This seems to use the same methods.
     
     
    It depends on the website but is usually a variation of this:
     

     
    You’ll notice the final URL I gave you is slightly different. That’s because not all parameters of the query string are strictly necessary.
  2. Like
    FreeeG reacted to vitor in Web Search without HTTP links   
    My version opens the page and then waits for it to finish loading before running the JS. I could have an extra check in place to guarantee the active tab is really that one, but in practice I doubt it’ll make a difference.
     
     
    I looked at the script tag and thought “nah, I don’t want to wade through javascript files to get the exact function”. It’s literally the first line! I’ve updated the previous link to use that solution. Thank you.

    Small technical note you may be interested in. To use that solution we have to change the way the JS is sent to Chrome. If we use execute({javascript: js_code}) it will execute our code but ignore the page’s, meaning it will fail to run getRooms(). The workaround is to instead url = 'javascript:' + js_code.
  3. Like
    FreeeG reacted to deanishe in Web Search without HTTP links   
    You can't use a regular Alfred web search for this because the page is a JavaScript "app". The URL you've found is called via JavaScript and injects the result into the current page.
     
    Consequently, to achieve the result you want, you need to inject JavaScript into the page and execute it.
     
    Here's a demo workflow.
     
    It's smart enough to inject the JS into the correct tab, but it's hard-coded to Safari because I know how to do all this in Safari.
     
    You appear to be using some kind of Chrome browser, so I'll leave adapting it to Chrome as an exercise for the reader  
     
    Mostly, you'll just need to change the code than injects/executes the JavaScript and point the workflow at the correct app.
  4. Thanks
    FreeeG reacted to vitor in Web Search without HTTP links   
    Welcome @FreeeG,
     
     
    The answer is “it depends on the website”. In this case what you type in the box is being sent to a PHP script that parses your request and sends the information back, at which point the webpage fits it in. When you’re sending your request directly to the PHP script, as in your example, you’re getting the raw information. There seems to be no simple way to do this by giving the browser a URL.

    A way to go about it is to tell the browser to open the page and then execute what needs to be done. Using JavaScript to write what you need on the search box isn’t enough because the page takes a while to detect it. What we can do is ignore the site’s search and do it ourselves, essentially loading the page, figuring out every element that doesn’t match what we want and hiding it.

    Like so (edited). I’ve made it work just in Chrome, as it seems to be the browser in your screenshots.
×
×
  • Create New...