summaryrefslogtreecommitdiffstats
path: root/Plugins/YoutubeChannel.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-06-05 13:49:17 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-06-05 13:49:17 +0200
commite028f8f826416679dac171b8a37c6b6264ac1b2e (patch)
treee4bb8ae83d4491f033694ce2159fe7d88e6f5bb8 /Plugins/YoutubeChannel.py
parentmerged (diff)
downloadpyload-e028f8f826416679dac171b8a37c6b6264ac1b2e.tar.xz
request cookies support, Shragle Plugin, Youtube Channel Plugin, Bluehost Plugin (correct regexp needed)
Diffstat (limited to 'Plugins/YoutubeChannel.py')
-rw-r--r--Plugins/YoutubeChannel.py41
1 files changed, 41 insertions, 0 deletions
diff --git a/Plugins/YoutubeChannel.py b/Plugins/YoutubeChannel.py
new file mode 100644
index 000000000..1a0af757e
--- /dev/null
+++ b/Plugins/YoutubeChannel.py
@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+
+import re
+
+from Plugin import Plugin
+
+class YoutubeChannel(Plugin):
+
+ def __init__(self, parent):
+ Plugin.__init__(self, parent)
+ props = {}
+ props['name'] = "YouTubeChannel"
+ props['type'] = "container"
+ props['pattern'] = r"http://(www\.)?(de\.)?\youtube\.com/user/*"
+ props['version'] = "0.1"
+ props['description'] = """Youtube.com Channel Download Plugin"""
+ props['author_name'] = ("RaNaN")
+ props['author_mail'] = ("RaNaN@pyload.org")
+ self.props = props
+ self.parent = parent
+ self.html = None
+
+ def download_html(self):
+ self.html = "Not needed"
+
+ def get_file_url(self):
+ """ returns the absolute downloadable filepath
+ """
+ self.user = re.search(r"/user/(.+)", self.parent.url).group(1)
+ url = "http://gdata.youtube.com/feeds/api/users/" + self.user + "/uploads?max-results=50"
+
+ return url
+
+ def file_exists(self):
+ """ returns True or False
+ """
+ return True
+
+ def proceed(self, url, location):
+ rep = self.req.load(url)
+ self.links = re.findall(r"href\='(http:\/\/www.youtube.com\/watch\?v\=[^']+)", rep) \ No newline at end of file