diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-10-05 01:55:44 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-10-05 02:27:38 +0200 |
commit | df10dce103716acc293f51572650b3dbb7264bf2 (patch) | |
tree | b4523f52f57ff81672a8bb7395c98784cb515c26 /module/plugins/hoster/UploadingCom.py | |
parent | Use load instead req.load in all crypters and CaptchaService (diff) | |
download | pyload-df10dce103716acc293f51572650b3dbb7264bf2.tar.xz |
Spare code fixes about COOKIES
Diffstat (limited to 'module/plugins/hoster/UploadingCom.py')
-rw-r--r-- | module/plugins/hoster/UploadingCom.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/module/plugins/hoster/UploadingCom.py b/module/plugins/hoster/UploadingCom.py index 45ab1d4cd..f4d6f5d8d 100644 --- a/module/plugins/hoster/UploadingCom.py +++ b/module/plugins/hoster/UploadingCom.py @@ -19,18 +19,18 @@ class UploadingCom(SimpleHoster): __author_name__ = ("jeix", "mkaay", "zoidberg") __author_mail__ = ("jeix@hasnomail.de", "mkaay@mkaay.de", "zoidberg@mujmail.cz") + FILE_NAME_PATTERN = r'id="file_title">(?P<N>.+)</' FILE_SIZE_PATTERN = r'size tip_container">(?P<S>[\d.]+) (?P<U>\w+)<' OFFLINE_PATTERN = r'(Page|file) not found' + COOKIES = [(".uploading.com", "lang", "1"), + (".uploading.com", "language", "1"), + (".uploading.com", "setlang", "en"), + (".uploading.com", "_lang", "en")] - def process(self, pyfile): - # set lang to english - self.req.cj.setCookie(".uploading.com", "lang", "1") - self.req.cj.setCookie(".uploading.com", "language", "1") - self.req.cj.setCookie(".uploading.com", "setlang", "en") - self.req.cj.setCookie(".uploading.com", "_lang", "en") + def process(self, pyfile): if not "/get/" in pyfile.url: pyfile.url = pyfile.url.replace("/files", "/files/get") @@ -42,6 +42,7 @@ class UploadingCom(SimpleHoster): else: self.handleFree() + def handlePremium(self): postData = {'action': 'get_link', 'code': self.file_info['ID'], @@ -55,6 +56,7 @@ class UploadingCom(SimpleHoster): raise Exception("Plugin defect.") + def handleFree(self): m = re.search('<h2>((Daily )?Download Limit)</h2>', self.html) if m: |