25__title__ =
"Revision3";
26__mashup_title__ =
"rev3"
27__author__=
"R.D. Vaughan"
36__usage_examples__ =
'''
39Usage: ./rev3.py -hduvlST [parameters] <search text>
40Version: v0.1.2 Author: R.D.Vaughan
42For details on the MythTV Netvision plugin see the wiki page at:
43http://www.mythtv.org/wiki/MythNetvision
46 -h, --help show this help message and exit
47 -d, --debug Show debugging info (URLs, raw XML ... etc, info
49 -u, --usage Display examples
for executing the script
50 -v, --version Display grabber name
and supported options
51 -l LANGUAGE, --language=LANGUAGE
52 Select data that matches the specified language fall
53 back to English
if nothing found (e.g.
'es' EspaƱol,
54 'de' Deutsch ... etc). Not all sites
or grabbers
56 -p PAGE NUMBER, --pagenumber=PAGE NUMBER
57 Display specific page of the search results. Default
58 is page 1. Page number
is ignored
with the Tree View
60 -S, --search Search
for videos
61 -T, --treeview Display a Tree View of a sites videos
65 <name>Revision3</name>
66 <author>R.D.Vaughan</author>
67 <thumbnail>rev3.png</thumbnail>
69 <description>Revision3
is the leading television network
for the internet generation.</description>
70 <version>v0.13</version>
75> ./rev3.py -S
"iPad" -p 1
76<?xml version=
"1.0" encoding=
"UTF-8"?>
77<rss version=
"2.0" xmlns:amp=
"http://www.adobe.com/amp/1.0"
78 xmlns:atom=
"http://www.w3.org/2005/Atom"
79 xmlns:cnettv=
"http://cnettv.com/mrss/"
80 xmlns:content=
"http://purl.org/rss/1.0/modules/content/"
81 xmlns:creativecommons=
"http://backend.userland.com/creativeCommonsRssModule"
82 xmlns:dc=
"http://purl.org/dc/elements/1.1/"
83 xmlns:itunes=
"http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:media=
"http://search.yahoo.com/mrss/">
85 <title>Revision3</title>
86 <link>http://revision3.com/</link>
87 <description>Revision3
is the leading television network
for the internet generation.</description>
88 <numresults>16</numresults>
89 <returned>15</returned>
90 <startindex>15</startindex>
92 <title>AppJudgment &gt; Episode 101 &gt; Voice Band
for the ...</title>
93 <author>Revision3</author>
94 <pubDate>Mon, 05 Apr 2010 23:10:47 GMT</pubDate>
95 <description>AppJudgment: Voice Band
for the iPhone/iPod Touch - &lt;br /&gt; &lt;br /&gt; AppJudgment:&lt;br /&gt; Download&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; Voice Band&lt;br /&gt; &lt;br /&gt; Version 1.1 ...</description>
96 <link>http://revision3.com/appjudgment/ip_mau_voiceband/voice-band-
for-the-iphone-ipod-touch?fs</link>
97 <mrss:group xmlns:mrss=
"http://search.yahoo.com/mrss/">
98 <mrss:thumbnail url=
""/>
99 <mrss:content duration=
"" height=
"" lang=
""
100 url=
"http://revision3.com/appjudgment/ip_mau_voiceband/voice-band-for-the-iphone-ipod-touch?fs" width=
""/>
106 <title>The Totally Rad Show &gt; Episode 150: Hockey Kahn ...</title>
107 <author>Revision3</author>
108 <pubDate>Mon, 05 Apr 2010 23:10:47 GMT</pubDate>
109 <description>The Totally Rad Show: Hockey Kahn - Edge of Darkness, MAG, iPad Gaming, the End of Miramax,
and More Twitter Q&amp;A - We walk the Edge of Darkness
with Mel Gibson. MAG ...</description>
110 <link>http://revision3.com/trs/hockeykhan?fs</link>
111 <mrss:group xmlns:mrss=
"http://search.yahoo.com/mrss/">
112 <mrss:thumbnail url=
""/>
113 <mrss:content duration=
"" height=
"" lang=
""
114 url=
"http://revision3.com/trs/hockeykhan?fs" width=
""/>
122<?xml version=
"1.0" encoding=
"UTF-8"?>
123<rss version=
"2.0" xmlns:amp=
"http://www.adobe.com/amp/1.0"
124 xmlns:atom=
"http://www.w3.org/2005/Atom"
125 xmlns:cnettv=
"http://cnettv.com/mrss/"
126 xmlns:content=
"http://purl.org/rss/1.0/modules/content/"
127 xmlns:creativecommons=
"http://backend.userland.com/creativeCommonsRssModule"
128 xmlns:dc=
"http://purl.org/dc/elements/1.1/"
129 xmlns:itunes=
"http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:media=
"http://search.yahoo.com/mrss/">
131 <title>Revision3</title>
132 <link>http://revision3.com/</link>
133 <description>Revision3
is the leading television network
for the internet generation.</description>
134 <numresults>1</numresults>
135 <returned>1</returned>
136 <startindex>1</startindex>
137 <directory name=
"Revision3" thumbnail=
"/usr/local/share/mythtv/mythnetvision/icons/revision3.png">
138 <directory name=
"Best Of... (HD MP4)" thumbnail=
"http://bitcast-a.bitgravity.com/revision3/images/shows/bestof/bestof.jpg">
140 <title>Hick - How to Train Your Dragon - Best Of...</title>
141 <author>feedback
@revision3.com (Revision3)</author>
142 <pubDate>Fri, 02 Apr 2010 00:00:00 GMT</pubDate>
143 <description>Dreamworks Animation has played second fiddle to the Pixar juggernaut
for years...</description>
144 <link>http://revision3.com/bestof/trs-0158</link>
145 <mrss:group xmlns:mrss=
"http://search.yahoo.com/mrss/">
146 <mrss:thumbnail url=
"http://bitcast-a.bitgravity.com/revision3/images/shows/bestof/0501/bestof--0501--trs-0158--mini.thumb.jpg"/>
147 <mrss:content duration=
"338" height=
"" lang=
"en"
148 url=
"http://www.podtrac.com/pts/redirect.mp4/bitcast-a.bitgravity.com/revision3/web/bestof/0501/bestof--0501--trs-0158--hd.h264.mp4" width=
""/>
154 <title>What Should You Know: Revision3 Beta</title>
156 <pubDate>Wed, 10 Sep 2008 20:25:30 GMT</pubDate>
157 <description>So when someone comes up to you
and asks
if you know about Revision3 Beta. This
is what you should say... http://wsyk.opensermo.com</description>
158 <link>http://revision3beta.com/watch/wsyk/4dcf948a/</link>
160 <media:thumbnail url=
"http://cdn-ll-80.viddler.com/e2/thumbnail_2_4dcf948a.jpg"/>
161 <media:content duration=
"" height=
"" lang=
""
162 url=
"http://revision3beta.com/watch/wsyk/4dcf948a/" width=
""/>
171__search_max_page_items__ = 15
172__tree_max_page_items__ = 15
178 """Wraps a stream with an encoder"""
187 """Wraps the output stream, encoding Unicode strings with the specified encoding"""
188 if isinstance(obj, str):
190 self.
out.buffer.write(obj)
193 """Delegate everything but write to the stream"""
194 return getattr(self.
out, attr)
196if isinstance(sys.stdout, io.TextIOWrapper):
204 '''Import the common python class
207except Exception
as e:
209The subdirectory "nv_python_libs/common" containing the modules common_api.py and
210common_exceptions.py (v0.1.3 or greater),
211They should have been included with the distribution of MythNetvision
215if common_api.__version__ <
'0.1.3':
216 sys.stderr.write(
"\n! Error: Your current installed common_api.py version is (%s)\nYou must at least have version (0.1.3) or higher.\n" % target.__version__)
222 '''Import the python Rev3 support classes
225except Exception
as e:
227The subdirectory "nv_python_libs/rev3" containing the modules rev3_api.py and
228rev3_exceptions.py (v0.1.0 or greater),
229They should have been included with the distribution of rev3.py.
233if target.__version__ <
'0.1.0':
234 sys.stderr.write(
"\n! Error: Your current installed rev3_api.py version is (%s)\nYou must at least have version (0.1.0) or higher.\n" % target.__version__)
240except Exception
as e:
242The python script "nv_python_libs/mainProcess.py" must be present.
247if process.__version__ <
'0.2.0':
248 sys.stderr.write(
"\n! Error: Your current installed mainProcess.py version is (%s)\nYou must at least have version (0.2.0) or higher.\n" % process.__version__)
251if __name__ ==
'__main__':
255 target.baseProcessingDir = os.path.dirname( os.path.realpath( __file__ ))
257 target.common = common_api.Common()
258 main = process.mainProcess(target, apikey, )
259 main.grabberInfo = {}
260 main.grabberInfo[
'enabled'] =
True
261 main.grabberInfo[
'title'] = __title__
262 main.grabberInfo[
'command'] =
'rev3.py'
263 main.grabberInfo[
'mashup_title'] = __mashup_title__
264 main.grabberInfo[
'author'] = __author__
265 main.grabberInfo[
'thumbnail'] =
'rev3.png'
266 main.grabberInfo[
'type'] = [
'video', ]
267 main.grabberInfo[
'desc'] =
"Revision3 is the leading television network for the internet generation."
268 main.grabberInfo[
'version'] = __version__
269 main.grabberInfo[
'search'] =
True
270 main.grabberInfo[
'tree'] =
True
271 main.grabberInfo[
'html'] =
False
272 main.grabberInfo[
'usage'] = __usage_examples__
273 main.grabberInfo[
'SmaxPage'] = __search_max_page_items__
274 main.grabberInfo[
'TmaxPage'] = __tree_max_page_items__
def __init__(self, outstream, encoding=None)
def __getattr__(self, attr)