Building a query

Hi…I’ve had DA and DTPO for years now. To be honest, I use DTPO every day, but even though I keep DA updated and installed, I don’t use it. I could never really get the hang of it. Here’s a for instance. I’m not sure if DA can do this. I’d like to schedule a daily search at thesamba.com/vw/classifieds/search.php

They have a search box at this site where I daily enter the following criteria: “syncro west” without quotes. It’s a VW site, and I’m looking for listings for Vanagons of the Syncro type that are also Westfalia’s specifically on this site. The native search box/function returns anything that has “syncro” and “west” in it. They are often referred to as either Westy’s or Westfalia’s, so “west” covers them both. I built a new search set in DA with the above URL as the “site,” but when I enter the boolean operator “syncro AND westy” (without quotes) and run the search in DA, I get 0 hits. When I run the search from within the site, I get quite a few. I want to be able to run this search automatically daily and have DA “tell” me when new listings appear. I was under the impression it could do this, but I don’t seem to be computer literate enough to make it happen. I also want to include some other select sites I watch daily, but The Samba is the primary one I want to get working in the search set if possible.

Any help or enlightenment on what I’m doing wrong or why I can’t do this would be greatly appreciated.

Brett

Hi, you want to build a plugin rather than a search set. Adding a page to a search set doesn’t make DA will use the search box…in this case it’s more like a starting point for a web spider, where DA will follow all the links on the page (if you configure it to) and then search those pages from your search term. This is useful on web pages that have lots of changing links, but no search feature. When the site does have a search feature though, you want to make a plugin.

Making a plugin is pretty easy, you just have to invest a bit of time learning how to do it and then you can make them for any sites you visit. If you open the DEVONagent help and then click on Documentation, and then “Plugin Development,” there is a tutorial you can follow.

You’ll have to experiment as you make the plugin. For example, I just made one for the site you mentioned, and I found that I needed to have it follow links, because the search results come up as links, and you want the actual content pages. Set DA to follow links one level deep, where the links contain “syncro OR west” – this looks for any link with one of those words in the name and follows it, which is what you want for these search results. Then I found that DA was trying to match against “syncro AND west” exactly (i.e. not matching westy) so I had to set the secondary query to “syncro west*”

I’m not that experienced with DA plugins yet, so it’s entirely possible that you can configure the plugin to behave that way. But at least for the site and query you’ve given, I was able to make a simple plugin that pulled back the first page of results.

Thanks for the starting point Padillac. I did indeed get a plugin set up. It didn’t return the results I wanted…so I’ll have to do some more research at this point. I’m still working at applying the tweaks you mentioned.

Thanks a bunch.

Brett