summaryrefslogtreecommitdiffstats
path: root/Plugins/YoutubeChannel.py
diff options
context:
space:
mode:
Diffstat (limited to 'Plugins/YoutubeChannel.py')
-rw-r--r--Plugins/YoutubeChannel.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/Plugins/YoutubeChannel.py b/Plugins/YoutubeChannel.py
index 1a0af757e..a1204c086 100644
--- a/Plugins/YoutubeChannel.py
+++ b/Plugins/YoutubeChannel.py
@@ -9,16 +9,17 @@ class YoutubeChannel(Plugin):
def __init__(self, parent):
Plugin.__init__(self, parent)
props = {}
- props['name'] = "YouTubeChannel"
+ props['name'] = "YoutubeChannel"
props['type'] = "container"
props['pattern'] = r"http://(www\.)?(de\.)?\youtube\.com/user/*"
- props['version'] = "0.1"
+ props['version'] = "0.2"
props['description'] = """Youtube.com Channel Download Plugin"""
- props['author_name'] = ("RaNaN")
- props['author_mail'] = ("RaNaN@pyload.org")
+ props['author_name'] = ("RaNaN", "Spoob")
+ props['author_mail'] = ("RaNaN@pyload.org", "Spoob@pyload.org")
self.props = props
self.parent = parent
self.html = None
+ self.read_config()
def download_html(self):
self.html = "Not needed"
@@ -27,8 +28,10 @@ class YoutubeChannel(Plugin):
""" 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"
-
+ max_videos = ""
+ if self.config['max_videos']:
+ max_videos = "?max-results=" + self.config['max_videos']
+ url = "http://gdata.youtube.com/feeds/api/users/" + self.user + "/uploads" + max_videos
return url
def file_exists(self):
@@ -38,4 +41,4 @@ class YoutubeChannel(Plugin):
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
+ self.links = re.findall(r"href\='(http:\/\/www.youtube.com\/watch\?v\=[^']+)", rep)