-
Notifications
You must be signed in to change notification settings - Fork 140
Adding a new site to the Agent :: The List
First step is to gather some basic information about your new site and add it to the big list of supported sites found in PAsearchSites.py. The four pieces of information you'll need about the new site are the name, the name, the base site URL, and the search page URL. Together it will look something like this:
searchSites[540] = ("Porn", "Porn", "http://www.porn.com", "http://www.porn.com/videos/search?q=")
Make sure you increment the number in brackets when adding your new site. You'll also need to increment the number in the variable declaration at the top of the list. It looks something like this:
searchSites = [None] * 541
The declaration at the top should always be one number bigger than the last number in the list. So if you add site 678, then make the declaration at the top be searchSites = [None] * 679
.
The first text string in the quotes is the site name that's used to match in the file name (or search string if you are manually searching). This can safely contain spaces and apostrophes as those get stripped out when checking for matches anyway, but other symbol characters should probably be avoided.
The second text string is the site name that's used to display everywhere else in the agent. This name might be used as the Tagline, or added to a Collection to keep all the content from this site together. There are no restrictions on what characters should or shouldn't be used here as this field is display only. As you can see scrolling through the list, it is not uncommon for the first two fields to match.
The third field is the base URL of the site. If the site has an HTTP (unsecure) version, it might be preferable to use that one, since some Plex installations have trouble with newer SSL certificates.
The last field is probably the most important. If the site you're adding has a search function on their page, enter the word "TEST" into it. You likely won't get any results back, but check the URL. You should get back something like https://www.porn.com/videos/search?q=TEST
. That is the URL you want to put in the 4th field (minus the TEST part). The agent will then use this URL, but instead of TEST, it will type your search terms to try and locate the specific scene you're trying to match.
Next, let's start building the code for searching and updating scenes from this new site...