Jump to content

How do I create a custom web search to ignore incremental numbering?


Recommended Posts

Hi all, new guy here! I've been using Alfred for years as a basic launcher and local search tool, and bought my PowerPack almost five years ago now. I sure haven't been taking advantage of the power of Alfred, though. I'm currently on Alfred 3.5.1 and Mac OS 10.12.6.

 

I've recently been catching up on Don McAllister's ScreenCastOnline tutorials, and one covered workflows and custom searches. So I thought I'd try one, and ran into a problem. I figured this was the best place to look, but couldn't find a similar problem when searching.

 

I am a moderator on a forum that uses Xenforo software. The search URL has something I haven't seen elsewhere, and I'm trying to find a way for Alfred to ignore it, or add a wild card. Here's the search URL when I enter tomato as a query:

 

https://overlandbound.com/forums/search/1691411/?q=tomato&o=date

 

Here's the search URL if I search for tomato again:

 

https://overlandbound.com/forums/search/1691412/?q=tomato&o=date

 

You will see that there is a number before  /?q= that increments with each search instance. Any suggestions on how to get around this? I tried inserting an asterisk as a wildcard, but no joy.

 

https://overlandbound.com/forums/search/*/?q={query}&o=date

 

I tried looking on the Xenforo administrators' forum, but all of that is way over my head, and I didn't know what I was looking at.

 

Any suggestions would be appreciated. Thanks in advance,

Steve

Screen Shot 2018-01-16 at 6.10.57 PM.png

Link to comment

@deanishe Thank you! That worked perfectly. Now, trying to expand on that, I want make a second search for the same forum that searches in the title only. Using the input shown in your example, I look at the inspector for the line where you check to search for title only. Following the same logic as before, I can't seem to come up with a working URL string. It seems like it should be something like this:

 

https://www.overlandbound.com/forums/search/search?keywords={query}?checkbox=title_only=1

 

And I've tried various version of (without the =1, with a slash instead of the ?, etc.) but I've never tried something like this, so the syntax is foreign to me.

The related line in inspector is:

<input type="checkbox" name="title_only" value="1" id="search_bar_title_only" class="AutoChecker" data-uncheck="#search_bar_thread">

 

Thank you again for any suggestions,

Steve

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...