From d7cb9ae1f13c579a38574889473eacc7ba9bd9a4 Mon Sep 17 00:00:00 2001 From: mkaay Date: Wed, 26 Jan 2011 23:50:39 +0100 Subject: uploading.com fix --- module/plugins/hoster/UploadingCom.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/hoster/UploadingCom.py b/module/plugins/hoster/UploadingCom.py index dec184abf..5843180a7 100644 --- a/module/plugins/hoster/UploadingCom.py +++ b/module/plugins/hoster/UploadingCom.py @@ -44,7 +44,15 @@ class UploadingCom(Hoster): def process(self, pyfile): # set lang to english - self.html[0] = self.load(self.pyfile.url, raw_cookies={"lang":"1"}) + 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") + + if not "/get" in self.pyfile.url: + self.pyfile.url = self.pyfile.url.replace("/files", "/files/get") + + self.html[0] = self.load(self.pyfile.url) if re.search(r'

The requested file is not found

', self.html[0]) is not None: self.offline() @@ -68,7 +76,7 @@ class UploadingCom(Hoster): postData['action'] = 'second_page' postData['code'] = self.code postData['file_id'] = self.fileid - + self.html[1] = self.load(self.pyfile.url, post=postData) wait_time = re.search(r'timead_counter">(\d+)<', self.html[1]) -- cgit v1.2.3