summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar spoob <spoob@gmx.de> 2009-05-26 15:01:02 +0200
committerGravatar spoob <spoob@gmx.de> 2009-05-26 15:01:02 +0200
commit4339a5e844b8593d5a4df2a84097e28878b19030 (patch)
tree03e787a7ed0c8cfe451a7b659a509103515d550d
parentlogic for container plugins implemented, basic plugin now downloads files, RS... (diff)
downloadpyload-4339a5e844b8593d5a4df2a84097e28878b19030.tar.xz
better youtube video id parsing, nicer testoutput
-rw-r--r--Plugins/RSDF.py2
-rw-r--r--Plugins/YoutubeCom.py8
-rw-r--r--module/download_thread.py6
3 files changed, 8 insertions, 8 deletions
diff --git a/Plugins/RSDF.py b/Plugins/RSDF.py
index 65f85edb4..9b377a2a3 100644
--- a/Plugins/RSDF.py
+++ b/Plugins/RSDF.py
@@ -74,4 +74,4 @@ class RSDF(Plugin):
print self.links
except:
- print "Kein Crypto installiert, RSDF Plugin kann nicht genutzt werden" \ No newline at end of file
+ print "Kein Crypto installiert, RSDF Plugin kann nicht genutzt werden"
diff --git a/Plugins/YoutubeCom.py b/Plugins/YoutubeCom.py
index 20a9bd7d1..0710711ea 100644
--- a/Plugins/YoutubeCom.py
+++ b/Plugins/YoutubeCom.py
@@ -9,12 +9,12 @@ class YoutubeCom(Plugin):
def __init__(self, parent):
Plugin.__init__(self, parent)
- self.plugin_name = "Youtube.com"
- self.plugin_pattern = r"http://(www\.)?(de\.)?\youtube\.com/watch\?v=(.*)"
+ self.plugin_name = "YoutubeCom"
+ self.plugin_pattern = r"http://(www\.)?(de\.)?\youtube\.com/watch\?v=.*"
self.plugin_type = "hoster"
self.plugin_config = {}
pluginProp = {}
- pluginProp ['name'] = "YoutubeCom"
+ pluginProp ['name'] = "Youtube.com"
pluginProp ['version'] = "0.1"
pluginProp ['format'] = "*.py"
pluginProp ['description'] = """Youtube Plugin"""
@@ -46,7 +46,7 @@ class YoutubeCom(Plugin):
if self.html == None:
self.download_html()
- videoId = re.search(self.plugin_pattern, self.parent.url).group(3)
+ videoId = self.parent.url.split("v=")[1].split("&")[0]
videoHash = re.search(r', "t": "([^"]+)"', self.html).group(1)
file_url = 'http://youtube.com/get_video?video_id=' + videoId + '&t=' + videoHash + '&fmt=18'
return file_url
diff --git a/module/download_thread.py b/module/download_thread.py
index 6eb90138f..502d42ddc 100644
--- a/module/download_thread.py
+++ b/module/download_thread.py
@@ -111,10 +111,10 @@ class Download_Thread(threading.Thread):
sleep(1) #eventuell auf genaue zeit warten
try:
- status.type = "downloading"
- print status.url , status.filename
+ status.type = "downloading"
+ print "download", status.filename
- pyfile.plugin.proceed(status.url, pyfile.download_folder + "/" + status.filename)
+ pyfile.plugin.proceed(status.url, pyfile.download_folder + "/" + status.filename)
status.type = "finished"
except:
status.type = "failed"