PDA

View Full Version : New ooba pattern for big-boys.com


shah
2005-07-10, 03:32
*edited* the script is complete now with support for movies, pictures and jokes on the big-boys.com site *edited*

attaching the ooba patterns for big-boys.com. thanks to phunck for an incredible and extensible multi-browser script, adding support for more websites has become quite easy. download his latest ooba script from xbmcscripts.com and edit the menu.xml file as follows.

at line 29, that is, after the line containing </action> and before the line containing <item>, insert the following xml code snippet:

<!-- patterns by shah at request from xbmc forum members-->
<item>
<title>big-boys</title>
<menu>
<item>
<title>movies</title>
<url><![cdata[http://www.big-boys.com/movie0.html]]></url>
</item>
<item>
<title>pictures</title>
<url><![cdata[http://www.big-boys.com/picture0.html]]></url>
</item>
<item>
<title>jokes</title>
<url><![cdata[http://www.big-boys.com/jokeindex.asp]]></url>
</item>
</menu>
<!--movies and pictures index pages-->
<action type="submenu">
<url><![cdata[^http://www\.big-boys\.com/((movie)|(picture))\d+\.html$]]></url>
<linkpattern>
<pattern><![cdata[<a\sclass=homechoice\shref=(?p<u rl>[^"'<>\s\?]+)>.+?face=verdana\scolor=000000>(?p <title>[^<]+)</font>]]></pattern>
</linkpattern>
<linkpattern>
<pattern><![cdata[<center>\s+?<center>(.*)<a\shref =(?p<url>((movie)|(picture))\d+\.html)>.+?(?p<titl e>next)\s]]></pattern>
</linkpattern>
</action>
<!--individual movie or picture pages-->
<action type="submenu">
<url><![cdata[^http://www\.big-boys\.com/articles/.+?\.html$]]></url>
<!--movies-->
<linkpattern>
<pattern><![cdata[description:[^\s]+\s+(?p<title>. +?)[\n\r]+.*?(?p<url>http://[^\.]+\.big-boys\.com/bbfilez/[^"'<>\s]+)]]></pattern>
</linkpattern>
<!--most pictures-->
<linkpattern>
<pattern><![cdata[/pictures/picture(?p<url>\d+)\.html.+?face=verdana>(?p<title >[^<]+)</font>]]></pattern>
<urlformat><![cdata[http://media2.big-boys.com/bbfilez/images/bbpics/pic\g<url>.jpg]]></urlformat>
</linkpattern>
<!--a few picture galleries that don't conform to pattern-->
<linkpattern>
<pattern><![cdata[/sb2005/sb(?p<url>\d+)\.html.+?face=verdana>(?p<title>[^<] +)</font>]]></pattern>
<urlformat><![cdata[http://media2.big-boys.com/bbfilez/sb2005/pic\g<url>.jpg]]></urlformat>
</linkpattern>
</action>
<!--main jokes category listing page-->
<action type="submenu">
<url><![cdata[^http://www\.big-boys\.com/jokeindex\.asp$]]></url>
<linkpattern>
<!--don't process the picture jokes category since it can't eb matched against a pattern-->
<pattern><![cdata[<a href="(?p<url>categorylist\.[^"'<>]+)"(?<!picture" ).+?<center>(?p<title>[^<]+)(?<!pictures)</center>]]></pattern>
</linkpattern>
</action>
<!--index page for each particular jokes category-->
<action type="submenu">
<url><![cdata[^http://www\.big-boys\.com/categorylist\.asp\?category=.+$]]></url>
<linkpattern>
<pattern><![cdata[href="(?p<url>joke\.asp\?id=\d+) .+?sans-serif">[\n\r]*(?p<title>[^<\n\r]+)[\n\r]*</font>]]></pattern>
</linkpattern>
</action>
<!--each individual text joke page-->
<action type="viewtext">
<url><![cdata[^http://www\.big-boys\.com/joke\.asp\?id=\d+$]]></url>
<grabtext><![cdata[<div style="padding-left:5pt;\spadding-top:0pt;.+?</font></div>]]></grabtext>
<htmldecode>1</htmldecode>
</action>
</item>

save the file, and ftp the ooba folder alongwith the new menu.xml file and other contents of the ooba folder over to the scripts folder of xbmc on the xbox.

launch the ooba script from the xbmc and you will see the menu for big-boys. click a to select from the list of movies, pictures and jokes - they should all work now.

in order to read the text of the jokes, you may need to patch your ooba.py file as follows if you can't view the text of the jokes (it's a teeny meeny change):

on line 251 of ooba.py file, change the line containing:
win.showtext(data,font)
to the following line:win.showtext(data,self.font)
phunck, if you read this, plz feel free to add the patterns to your distribution, the site has some funny videos, pictures and jokes and it was requested by quite a few folks over in the request forum.

enjoy!

shah

shah
2005-07-10, 04:50
i have added support for both videos and pictures now. only jokes left and that should be coming soon as well. the revised pattern is embedded in my original post and it should support both movies and pictures now.

enjoy

shah

shah
2005-07-10, 07:23
completed the script with support for movies, pictures and jokes on the big-boy.com website. i have updated my original post above with revised patterns and additional instructions.
enjoy!
shah

zhugeliang
2005-07-10, 20:25
i can't get this thing to work. i keep trying to paste it in there but either it doesn't show up in the list of things to watch or the entire thing is blanked out completely. what program are you using to edit the menu?

is it possible for you to upload the menu.xml for me?

shah
2005-07-10, 22:51
i use xmlspy but you don't have to. notepad will work just fine. i can also upload the entire menu.xml file but i don't see an option or any place here to do that. can you tell me how i can upload a file?

shah

ocwasere
2005-07-24, 00:03
hi i just tried your script and the pic/movies don't work the jokes work good
so do i have to change anything if so could tell me please
as this is my first go at this very cool

thanks