30__author__=
"R.D. Vaughan"
40__usage_examples__ =
'''
42Usage: ./vimeo.py -hduvlST [parameters] <search text>
43Version: v0.22 Author: R.D.Vaughan
45For details on the MythTV Netvision plugin see the wiki page at:
46http://www.mythtv.org/wiki/MythNetvision
49 -h, --help show this help message and exit
50 -d, --debug Show debugging info (URLs, raw XML ... etc, info
52 -u, --usage Display examples
for executing the script
53 -v, --version Display grabber name
and supported options
54 -l LANGUAGE, --language=LANGUAGE
55 Select data that matches the specified language fall
56 back to English
if nothing found (e.g.
'es' Español,
57 'de' Deutsch ... etc). Not all sites
or grabbers
59 -p PAGE NUMBER, --pagenumber=PAGE NUMBER
60 Display specific page of the search results. Default
61 is page 1. Page number
is ignored
with the Tree View
63 -S, --search Search
for videos
64 -T, --treeview Display a Tree View of a sites videos
67(Search
for all videos identified
with the word
"Dragon")
68> ./vimeo.py -p 1 -S
"Dragon"
69<?xml version=
"1.0" encoding=
"UTF-8"?>
71xmlns:itunes=
"http://www.itunes.com/dtds/podcast-1.0.dtd"
72xmlns:content=
"http://purl.org/rss/1.0/modules/content/"
73xmlns:cnettv=
"http://cnettv.com/mrss/"
74xmlns:creativeCommons=
"http://backend.userland.com/creativeCommonsRssModule"
75xmlns:media=
"http://search.yahoo.com/mrss/"
76xmlns:atom=
"http://www.w3.org/2005/Atom"
77xmlns:amp=
"http://www.adobe.com/amp/1.0"
78xmlns:dc=
"http://purl.org/dc/elements/1.1/">
81 <link>http://vimeo.com</link>
82 <description>Vimeo
is a respectful community of creative people who are passionate about sharing the videos they make.</description>
83 <numresults>4856</numresults>
84 <returned>20</returned>
85 <startindex>20</startindex>
87 <title>Typophile Film Festival 5 Opening Titles</title>
88 <author>Brent Barson</author>
89 <pubDate>Tue, 01 Sep 2009 12:27:46 GMT</pubDate>
90 <description>Handcrafted
with love by BYU design students
and faculty,
for the 5th Typophile Film Festival. A visual typographic feast about the five senses,
and how they contribute to
and enhance our creativity. Everything
in the film
is realâno CG effects! Shot
with a RED One, a Canon EOS 5D Mark II, a Canon EOS 40D,
and a Nikon D80. Stop motion created
with Dragon Stop Motion. Creative Director & Faculty Mentor: Brent Barson Writing & Storyboarding: Brent Barson, Jessica Blackham, Analisa Estrada, Meg Gallagher, John Jensen, Regan Fred Johnson, Colin âThe Pinâ Pinegar Construction, Paint & Glue: Brent Barson, Wynn Burton, Analisa Estrada, Meg Gallagher, Olivia Juarez Knudsen, Casey Lewis, Reeding Roberts, Deven Stephens, Brian Christensen (Brain Sculpture) Animators: Brent Barson, Wynn Burton, Analisa Estrada, Meg Gallagher, Olivia Juarez Knudsen, Reeding Roberts, Deven Stephens Cinematographer: Wynn Burton Editing: Brent Barson, Wynn Burton, Analisa Estrada, Meg Gallagher, Reeding Roberts Hand Models: Analisa Estrada, Meg Gallagher, Olivia Juarez Knudsen, Deven Stephens, Michelle Stephens Original Music: micah dahl anderson - www.micahdahl.com Special thanks to Joe, Jared, Zara,
and the Punchut/Typophile crew
for enabling this!</description>
91 <link>http://vimeo.com/moogaloop.swf?clip_id=6382511&autoplay=1</link>
93 <media:thumbnail url=
'http://ats.vimeo.com/238/418/23841853_200.jpg'/>
94 <media:content url=
'http://vimeo.com/moogaloop.swf?clip_id=6382511&autoplay=1' duration=
'221' width=
'640' height=
'352' lang=
''/>
100 <title>
"The Dragon's Claw" by Justice of the Unicorns</title>
101 <author>Robert Bruce</author>
102 <pubDate>Mon, 20 Apr 2009 08:10:32 GMT</pubDate>
103 <description>
"The Dragon's Claw" The official music video
for Justice of the Unicorns
from the album
"Angels with Uzis". Winner of Best Music Video at the 2009 Animation Block Party. http://justiceoftheunicorns.com Animated
in Flash. Composited
in Combustion. Get your free Cubeecraft Bunny Toy! http://robbruce.blogspot.com/2009/05/mutant-pmp-bunny-of-your-very-own.html robthebruce.com Please feel free to email me
for rate quotes, questions, answers, weather reports, cookie recipes,
or just to say hi. rob
@robthebruce.com</description>
104 <link>http://vimeo.com/moogaloop.swf?clip_id=4239300&autoplay=1</link>
106 <media:thumbnail url=
'http://ats.vimeo.com/926/443/9264438_200.jpg'/>
107 <media:content url=
'http://vimeo.com/moogaloop.swf?clip_id=4239300&autoplay=1' duration=
'206' width=
'640' height=
'368' lang=
''/>
114(Option
return Tree view)
116<?xml version=
"1.0" encoding=
"UTF-8"?>
118xmlns:itunes=
"http://www.itunes.com/dtds/podcast-1.0.dtd"
119xmlns:content=
"http://purl.org/rss/1.0/modules/content/"
120xmlns:cnettv=
"http://cnettv.com/mrss/"
121xmlns:creativeCommons=
"http://backend.userland.com/creativeCommonsRssModule"
122xmlns:media=
"http://search.yahoo.com/mrss/"
123xmlns:atom=
"http://www.w3.org/2005/Atom"
124xmlns:amp=
"http://www.adobe.com/amp/1.0"
125xmlns:dc=
"http://purl.org/dc/elements/1.1/">
128 <link>http://vimeo.com</link>
129 <description>Vimeo
is a respectful community of creative people who are passionate about sharing the videos they make.</description>
130 <numresults>18</numresults>
131 <returned>1</returned>
132 <startindex>0</startindex>
133 <directory name=
"Newest Channels/Most ..." thumbnail=
"/usr/local/share/mythtv/mythnetvision/icons/vimeo.png">
134 <directory name=
"Most Recent Channels" thumbnail=
"/usr/local/share/mythtv/mythnetvision/icons/directories/topics/most_recent.png">
136 <title>PSA 1: Family Meal
is a Healthy Meal</title>
137 <author>Kevin Shermach</author>
138 <pubDate>Tue, 05 Jan 2010 13:08:56 GMT</pubDate>
139 <description>Channel
"NYC YMCA new PSA Campaign": :30, :15
and :10</description>
140 <link>http://vimeo.com/moogaloop.swf?clip_id=8557253&autoplay=1</link>
142 <media:thumbnail url=
'http://ts.vimeo.com.s3.amazonaws.com/402/131/40213146_200.jpg'/>
143 <media:content url=
'http://vimeo.com/moogaloop.swf?clip_id=8557253&autoplay=1' duration=
'60' width=
'480' height=
'272' lang=
''/>
149 <title>NIN Sydney 2.24.09 - Mid-show Power Outage [HD]</title>
150 <author>Nine Inch Nails</author>
151 <pubDate>Tue, 24 Feb 2009 13:58:19 GMT</pubDate>
152 <description>Power
in the Hordern Pavilion went out midway through the set, forcing the show to stop
for 40 minutes
and nearly causing it to be canceled. Filmed by Rob Sheridan
with the Canon 5D Mark II.</description>
153 <link>http://vimeo.com/moogaloop.swf?clip_id=3353364&autoplay=1</link>
155 <media:thumbnail url=
'http://ats.vimeo.com/240/077/2400771_200.jpg'/>
156 <media:content url=
'http://vimeo.com/moogaloop.swf?clip_id=3353364&autoplay=1' duration=
'268' width=
'504' height=
'284' lang=
''/>
166__search_max_page_items__ = 20
167__tree_max_page_items__ = 20
172class OutStreamEncoder(object):
173 """Wraps a stream with an encoder
183 """Wraps the output stream, encoding Unicode strings with the specified encoding"""
184 if isinstance(obj, str):
186 self.
out.buffer.write(obj)
189 """Delegate everything but write to the stream"""
190 return getattr(self.
out, attr)
193if isinstance(sys.stdout, io.TextIOWrapper):
203except Exception
as e:
205The subdirectory "nv_python_libs/vimeo" containing the modules vimeo_api.py (v0.2.0 or greater),
206They should have been included with the distribution of vimeo.py.
211if target.__version__ <
'0.2.0':
212 sys.stderr.write(
"\n! Error: Your current installed vimeo_api.py version is (%s)\nYou must at least have version (0.2.0) or higher.\n" % target.__version__)
223except Exception
as e:
225The python script "nv_python_libs/mainProcess.py" must be present.
230if process.__version__ <
'0.2.0':
231 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__)
234if __name__ ==
'__main__':
237 main = process.mainProcess(target, apikey, )
238 main.grabberInfo = {}
239 main.grabberInfo[
'enabled'] =
True
240 main.grabberInfo[
'title'] = __title__
241 main.grabberInfo[
'command'] =
'vimeo.py'
242 main.grabberInfo[
'author'] = __author__
243 main.grabberInfo[
'thumbnail'] =
'vimeo.png'
244 main.grabberInfo[
'type'] = [
'video']
245 main.grabberInfo[
'desc'] =
"Vimeo is a respectful community of creative people who are passionate about sharing the videos they make."
246 main.grabberInfo[
'version'] = __version__
247 main.grabberInfo[
'search'] =
True
248 main.grabberInfo[
'tree'] =
True
249 main.grabberInfo[
'html'] =
False
250 main.grabberInfo[
'usage'] = __usage_examples__
251 main.grabberInfo[
'SmaxPage'] = __search_max_page_items__
252 main.grabberInfo[
'TmaxPage'] = __tree_max_page_items__
def __getattr__(self, attr)
def __init__(self, outstream, encoding=None)