SynoLoad - RegExp Validator
- In the URL field, enter the URL of the search web page. The keyword "[search]" will be replaced by the phrase entered in the Search field in SynoLoad. (Ex: http://www.mininova.org/rss/[search])
- In the word field, enter a word to search.
- In the regular expression area, enter your regular expression. For instance, for Mininova, you would enter:
<item[^<>]*>[^<>]*<title[^<>]*>([^<>]*)</title[^<>]*>[^<>]*<guid[^<>]*>[^<>]*</guid[^<>]*>[^<>]*<pubDate[^<>]*>[^<>]*</pubDate[^<>]*>[^<>]*<category[^<>]*>[^<>]*</category[^<>]*>[^<>]*<link[^<>]*>[^<>]*</link[^<>]*>[^<>]*<enclosure url="([^<>"]*)"[^<>]*/>[^<>]*<description[^<>]*>[^<>]*<!\[CDATA\[*[^<>]*Category: [^<>]*<a[^<>]*>[^<>]*</a[^<>]*>[^<>]*<br[^<>]*>[^<>]*Subcategory: [^<>]*<a[^<>]*>[^<>]*</a[^<>]*>[^<>]*<br[^<>]*>[^<>]*Size: ([^<>]*)<br[^<>]*>[^<>]*Ratio: ([^<>]*)<br[^<>]*>[^<>]*
A regular expression can be quite big. As a general rule, you would type the tag names (ex: <something[^<>]*> to match <something some="thing" foo="bar"> and [^<>]* for in between stuff)
Then, once an item is recognized, you will need to identify the good stuff, such as LINK, TITLE and SIZE. For this, use "(" and ")". Then, with the list at the bottom of the application, you will be able to see which index to put in SynoLoad (first line in the list is "0").
For example: To match the title in :
<title something="blah">Title to catch</Title><Another blah="bip"/><Link>http://link.to/catch</Link>
You would enter :
<title[^<>]*>([^<>]*)</Title><Another[^<>]*/><Link[^<>]*>([^<>]*)</Link>
And specify title index as "1" and link index as "2". The result will be "Title to catch" and "http://link.to/catch"