summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/LinksnappyCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-02-16 21:59:10 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-02-16 21:59:10 +0100
commit8e7d14bae4d3c836f029a1235eb227380acc3f75 (patch)
treeebd0679642cccb994e70a89a106b394189cb28bc /module/plugins/hoster/LinksnappyCom.py
parentMerge branch 'stable' into 0.4.10 (diff)
downloadpyload-8e7d14bae4d3c836f029a1235eb227380acc3f75.tar.xz
Fix plugins to work on 0.4.10
Diffstat (limited to 'module/plugins/hoster/LinksnappyCom.py')
-rw-r--r--module/plugins/hoster/LinksnappyCom.py58
1 files changed, 0 insertions, 58 deletions
diff --git a/module/plugins/hoster/LinksnappyCom.py b/module/plugins/hoster/LinksnappyCom.py
deleted file mode 100644
index 5b0fab43a..000000000
--- a/module/plugins/hoster/LinksnappyCom.py
+++ /dev/null
@@ -1,58 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import re
-
-from urlparse import urlsplit
-
-from module.common.json_layer import json_loads, json_dumps
-from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
-
-
-class LinksnappyCom(MultiHoster):
- __name__ = "LinksnappyCom"
- __type__ = "hoster"
- __version__ = "0.08"
-
- __pattern__ = r'https?://(?:[^/]+\.)?linksnappy\.com'
-
- __description__ = """Linksnappy.com multi-hoster plugin"""
- __license__ = "GPLv3"
- __authors__ = [("stickell", "l.stickell@yahoo.it")]
-
-
- SINGLE_CHUNK_HOSTERS = ["easybytez.com"]
-
-
- def handlePremium(self, pyfile):
- host = self._get_host(pyfile.url)
- json_params = json_dumps({'link' : pyfile.url,
- 'type' : host,
- 'username': self.user,
- 'password': self.account.getAccountData(self.user)['password']})
-
- r = self.load("http://gen.linksnappy.com/genAPI.php",
- post={'genLinks': json_params})
-
- self.logDebug("JSON data: " + r)
-
- j = json_loads(r)['links'][0]
-
- if j['error']:
- self.error(_("Error converting the link"))
-
- pyfile.name = j['filename']
- self.link = j['generated']
-
- if host in self.SINGLE_CHUNK_HOSTERS:
- self.chunkLimit = 1
- else:
- self.setup()
-
-
- @staticmethod
- def _get_host(url):
- host = urlsplit(url).netloc
- return re.search(r'[\w-]+\.\w+$', host).group(0)
-
-
-getInfo = create_getInfo(LinksnappyCom)