summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/UploadkingCom.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/UploadkingCom.py
parentSimpleHoster fix (diff)
downloadpyload-9378237ddc39f8ee96e7a3ddb9cc37ce487c5f4d.tar.xz
fix filepost (#431), hellspy, ifolder, letitbit, change SimpleHoster patterns
Diffstat (limited to 'module/plugins/hoster/UploadkingCom.py')
-rw-r--r--module/plugins/hoster/UploadkingCom.py21
1 files changed, 7 insertions, 14 deletions
diff --git a/module/plugins/hoster/UploadkingCom.py b/module/plugins/hoster/UploadkingCom.py
index a706e95bc..a2e246d29 100644
--- a/module/plugins/hoster/UploadkingCom.py
+++ b/module/plugins/hoster/UploadkingCom.py
@@ -17,28 +17,19 @@
"""
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(UploadkingCom, url, getURL(url, decode=False))
- result.append(file_info)
-
- yield result
+from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class UploadkingCom(SimpleHoster):
__name__ = "UploadkingCom"
__type__ = "hoster"
__pattern__ = r"http://(?:www\.)?uploadking\.com/\w{10}"
- __version__ = "0.12"
+ __version__ = "0.13"
__description__ = """UploadKing.com plugin - free only"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
- FILE_INFO_PATTERN = r'<font style="font-size:\d*px;">File(?:name)?:\s*<(?:b|/font><font[^>]*)>([^<]+)(?:</b>)?</div></TD></TR><TR><TD[^>]*><font style="font-size:\d*px;">(?:Files|S)ize:\s*<(?:b|/font><font[^>]*)>([0-9.]+) ([kKMG]i?B)</(?:b|font)>'
+ FILE_NAME_PATTERN = r'<font style="font-size:\d*px;">File(?:name)?:\s*<(?:b|/font><font[^>]*)>(?P<N>[^<]+)'
+ FILE_SIZE_PATTERN = r'<font style="font-size:\d*px;">(?:Files|S)ize:\s*<(?:b|/font><font[^>]*)>(?P<S>[0-9.]+) (?P<U>[kKMG])i?B'
FILE_OFFLINE_PATTERN = r'<center><font[^>]*>Unfortunately, this file is unavailable</font></center>'
FILE_URL_PATTERN = r'id="dlbutton"><a href="([^"]+)"'
@@ -47,4 +38,6 @@ class UploadkingCom(SimpleHoster):
if not found: self.fail("Download URL not found")
url = found.group(1)
self.logDebug("DOWNLOAD URL: " + url)
- self.download(url) \ No newline at end of file
+ self.download(url)
+
+create_getInfo(UploadkingCom) \ No newline at end of file