Video Devil plugin status? - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: Add-ons Help and Support (/forumdisplay.php?fid=27)
+---- Forum: Video Add-ons (/forumdisplay.php?fid=154)
+---- Thread: Video Devil plugin status? (/showthread.php?tid=58892)
- MaxMustermann - 2011-06-19 22:36
dtviewer Wrote:Thanks for the help so far.
Ok, I will explain some basics.
The lines starting with "item_infos" contain so called regular expressions that define patterns for a website. This way you can retrieve only interesting parts and discard the rest. The parentheses without leading "\" mark the exact infos that are taken from these patterns. The surrounding characters are used to make the pattern unique. Each info is stored in a variable whose name is defined in "item_order".
Example for regular expressions:
Text to search in:
"This is the 1. sentence of 10. This is the 2. sentence of 10. ..."
Task: Get every number
Matches: 1, 10, 2, 10, 3, 10, ...
Task: Get every word
Matches: This, is, the, sentence, of, This, ...
Task: Get every word that doesn't start with T
Matches: is, sentence, of, the, is, sentence, of, the ...
Task: Get every number at the end of the sentence
Pattern: (\d+)\. [A-Z]\w+ (Each sentence starting with a capital letter and ending with a period)
Matches: 10, 10, 10, 10, ...
Task: Get the numbers that are followed by a period and a word starting with s , then store both the number and the word in a variable
Pattern: item_infos=(\d+)\. s(\w+)
number = "1." ; word = "sentence"
number = "2." ; word = "sentence"
number = "3." ; word = "sentence"
Example pattern for "next page":
Look into the html source code of the website and search for something like "Next" or ">>" or just ">".
When you have found a match, select it together with some surrounding tags. See that you neither take a part that is too long (possibly won't match for the next page) nor a part that is too short (could match with more than one part of the page). => Take the shortest unique part
item_infos=<td width="30"><a href="http://www.website.com/2">Next</a></td>
Then, mark the exact info and declare a corresponding variable.
item_infos=<td width="30"><a href="(http://www.website.com/2)">Next</a></td>
Make the pattern more flexible and robust against website changes.
Basically, you can name the variables as you want. But some variables are special: url, title, icon, genre,... You cannot overwrite their values in "item_info_name=...item_info_build=..." sections.
So when you put some info into "url", it should at least be a part of the final url of the item. In "item_url_build" you can complete the url, "%s" is a wildcard for the value of the "url" variable. This is useful for links like "...href="/page2">..." => item_url_build=http://www.website.com%s
- dtviewer - 2011-06-19 23:18
Thanks for the lesson!!
- moerkedahl - 2011-07-03 18:22
just fixed eporner.com. As I do not have repository access, here is a short tut on how to apply the fix:
1. Open eporner.com.cfg in /plugin.video.videodevil/resources in a texteditor (notepad++ highly recommended)
2. Replace line 9 (item_infos=... in the "Videos" section) with:
Thx to MaxMustermann for his brief introduction to RegEx. Read some more stuff on it and managed to apply the patch within 30 minutes Will try to fix other broken sites aswell...
If anybody with repository access could plz be so kind and apply the patch, that would be just lovely
- VelvetKevorkian - 2011-07-05 19:49
- dtviewer - 2011-07-05 21:54
I wanted to fix xhamster and havent been able to make it work yet.
- derror - 2011-07-06 00:12
replacing line 65 in xhamster.com.cfg by
- dtviewer - 2011-07-06 01:36
derror Wrote:replacing line 65 in xhamster.com.cfg by
That did it!
Now I can compare what you did to what I tried and figure out what I did wrong...hopefully.....
- Scorpius - 2011-07-07 07:31
I fixed tube8 with this:
And I really wanted to fix StileProject but it's impossible since it changed the way to obtain a valid URL for the video, so I think that site is lost forever. It now executes a Flash program to get the URL first, and then loads the player with a valid-one-time-only URL.
- VelvetKevorkian - 2011-07-08 14:06
Thx to the fix, the "next" button works again in xhamster, but the search function still doesn't work - i always get an "error running videodevil" message.
- jerbone - 2011-08-23 20:17
Can anybody get pornoXO to work? I am betting it just needs a little tweak.