summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/QuickshareCz.py
diff options
context:
space:
mode:
authorGravatar zoidberg10 <zoidberg@mujmail.cz> 2011-11-22 00:26:08 +0100
committerGravatar zoidberg10 <zoidberg@mujmail.cz> 2011-11-22 00:26:08 +0100
commit9378237ddc39f8ee96e7a3ddb9cc37ce487c5f4d (patch)
tree325aba4194c29ee7869f662e1b8f8b5015afd283 /module/plugins/hoster/QuickshareCz.py
parentSimpleHoster fix (diff)
downloadpyload-9378237ddc39f8ee96e7a3ddb9cc37ce487c5f4d.tar.xz
fix filepost (#431), hellspy, ifolder, letitbit, change SimpleHoster patterns
Diffstat (limited to 'module/plugins/hoster/QuickshareCz.py')
-rw-r--r--module/plugins/hoster/QuickshareCz.py27
1 files changed, 8 insertions, 19 deletions
diff --git a/module/plugins/hoster/QuickshareCz.py b/module/plugins/hoster/QuickshareCz.py
index 4c82ff1a9..ef33d3263 100644
--- a/module/plugins/hoster/QuickshareCz.py
+++ b/module/plugins/hoster/QuickshareCz.py
@@ -17,44 +17,31 @@
"""
import re
-from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo
-from module.network.RequestFactory import getURL
-
-def getInfo(urls):
- result = []
-
- for url in urls:
- file_info = parseFileInfo(QuickshareCz, url, getURL(url, decode=True))
- result.append(file_info)
-
- yield result
+from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class QuickshareCz(SimpleHoster):
__name__ = "QuickshareCz"
__type__ = "hoster"
__pattern__ = r"http://.*quickshare.cz/stahnout-soubor/.*"
- __version__ = "0.51"
+ __version__ = "0.52"
__description__ = """Quickshare.cz"""
__author_name__ = ("zoidberg")
VAR_PATTERN = r"var ID1 = '(?P<ID1>[^']+)';var ID2 = '(?P<ID2>[^']+)';var ID3 = '(?P<ID3>[^']+)';var ID4 = '(?P<ID4>[^']+)';var ID5 = '[^']*';var UU_prihlasen = '[^']*';var UU_kredit = [^;]*;var velikost = [^;]*;var kredit_odecet = [^;]*;var CaptchaText = '(?P<CaptchaText>[^']+)';var server = '(?P<Server>[^']+)';"
FILE_OFFLINE_PATTERN = r'<script type="text/javascript">location.href=\'/chyba\';</script>'
- FILE_SIZE_PATTERN = r'<br>Velikost: <strong>([0-9.]+)</strong>\s*(KB|MB|GB)<br>'
+ FILE_NAME_PATTERN = r'<th width="145px">Název:</th>\s*<td style="word-wrap:break-word;">(?P<N>[^<]+)</td>'
+ FILE_SIZE_PATTERN = r'<th>Velikost:</th>\s*<td>(?P<S>[0-9.]+) (?P<U>[kKMG])i?B</td>'
def setup(self):
self.multiDL = False
def process(self, pyfile):
self.html = self.load(pyfile.url, decode=True)
-
- # marks the file as "offline" when the pattern was found on the html-page
- if re.search(self.FILE_OFFLINE_PATTERN, self.html) is not None:
- self.offline()
+ self.getFileInfo()
# parse the name from the site and set attribute in pyfile
parsed_vars = re.search(self.VAR_PATTERN, self.html)
- if parsed_vars is None:
- self.fail("Parser error")
+ if parsed_vars is None: self.parseError("VARs")
pyfile.name = parsed_vars.group('ID3')
@@ -77,3 +64,5 @@ class QuickshareCz(SimpleHoster):
if check == "no_slots":
self.retry(5, 600, "No free slots")
+
+create_getInfo(QuickshareCz) \ No newline at end of file