summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-03-13 20:41:18 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-03-13 20:41:18 +0100
commitfe56321d8a29bc6b53faa8429e362c9110c354d5 (patch)
tree055471957947ddef7a02483c28e95b17c3a11b7e /module/plugins/hoster
parentEgoFilesCom: premium better handled (diff)
parentMovie2kTo: Fixed and tested it. (diff)
downloadpyload-fe56321d8a29bc6b53faa8429e362c9110c354d5.tar.xz
Merge pull request #43 from 4Christopher/stable
Fixed Movie2kTo, XvidstageCom
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/ChipDe.py24
-rw-r--r--module/plugins/hoster/XvidstageCom.py13
2 files changed, 31 insertions, 6 deletions
diff --git a/module/plugins/hoster/ChipDe.py b/module/plugins/hoster/ChipDe.py
new file mode 100644
index 000000000..fcb84a300
--- /dev/null
+++ b/module/plugins/hoster/ChipDe.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import re
+from module.plugins.Crypter import Crypter
+
+class ChipDe(Crypter):
+ __name__ = "ChipDe"
+ __type__ = "container"
+ __pattern__ = r"http://(?:www\.)?chip.de/video/.*\.html"
+ __version__ = "0.1"
+ __description__ = """Chip.de Container Plugin"""
+ __author_name__ = ('4Christopher')
+ __author_mail__ = ('4Christopher@gmx.de')
+
+ def decrypt(self, pyfile):
+ self.html = self.load(pyfile.url)
+ try:
+ url = re.search(r'"(http://video.chip.de/\d+?/.*)"', self.html).group(1)
+ self.logDebug('The file URL is %s' % url)
+ except:
+ self.fail('Failed to find the URL')
+
+ self.packages.append((self.pyfile.package().name, [ url ], self.pyfile.package().folder))
diff --git a/module/plugins/hoster/XvidstageCom.py b/module/plugins/hoster/XvidstageCom.py
index 38c54efec..14079df43 100644
--- a/module/plugins/hoster/XvidstageCom.py
+++ b/module/plugins/hoster/XvidstageCom.py
@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, see <http://www.gnu.org/licenses/>.
-
+
@author: 4Christopher
"""
@@ -29,7 +29,7 @@ def setup(self):
def getInfo(urls):
result = []
-
+
for url in urls:
result.append(parseFileInfo(url, getInfoMode = True))
yield result
@@ -37,9 +37,10 @@ def getInfo(urls):
def parseFileInfo(url, getInfoMode = False):
html = getURL(url)
info = {"name" : url, "size" : 0, "status" : 3}
- info['name'] = re.search(r'(?:Filename|Dateiname):</b></td><td nowrap[^>]*?>(.*?)<', html).group(1)
- info['size'] = re.search(r'(?:Size|Größe):</b></td><td>.*? <small>\((\d+?) bytes\)', html).group(1)
- if info['size'] == 0:
+ try:
+ info['name'] = re.search(r'(?:Filename|Dateiname):</b></td><td nowrap[^>]*?>(.*?)<', html).group(1)
+ info['size'] = re.search(r'(?:Size|Größe):</b></td><td>.*? <small>\((\d+?) bytes\)', html).group(1)
+ except: ## The file is offline
info['status'] = 1
else:
info['status'] = 2
@@ -51,7 +52,7 @@ def parseFileInfo(url, getInfoMode = False):
class XvidstageCom(Hoster):
__name__ = 'XvidstageCom'
- __version__ = '0.2'
+ __version__ = '0.3'
__pattern__ = r'http://(?:www.)?xvidstage.com/(?P<id>[0-9A-Za-z]+)'
__type__ = 'hoster'
__description__ = """A Plugin that allows you to download files from http://xvidstage.com"""