summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/plugins/hoster/BillionuploadsCom.py4
-rw-r--r--module/plugins/hoster/KingfilesNet.py10
-rw-r--r--module/plugins/hoster/XFileSharingPro.py6
-rw-r--r--module/plugins/internal/CaptchaService.py8
4 files changed, 11 insertions, 17 deletions
diff --git a/module/plugins/hoster/BillionuploadsCom.py b/module/plugins/hoster/BillionuploadsCom.py
index c070e18b9..90e296e0d 100644
--- a/module/plugins/hoster/BillionuploadsCom.py
+++ b/module/plugins/hoster/BillionuploadsCom.py
@@ -17,8 +17,8 @@ class BillionuploadsCom(XFileSharingPro):
HOSTER_NAME = "billionuploads.com"
- FILE_NAME_PATTERN = r'<b>Filename:</b>(?P<N>.*?)<br>'
- FILE_SIZE_PATTERN = r'<b>Size:</b>(?P<S>.*?)<br>'
+ FILE_NAME_PATTERN = r'<td class="dofir" title="(?P<N>.+?)"'
+ FILE_SIZE_PATTERN = r'<td class="dofir">(?P<S>[\d.]+) (?P<U>\w+)'
getInfo = create_getInfo(BillionuploadsCom)
diff --git a/module/plugins/hoster/KingfilesNet.py b/module/plugins/hoster/KingfilesNet.py
index 66a639a14..e8aefa53b 100644
--- a/module/plugins/hoster/KingfilesNet.py
+++ b/module/plugins/hoster/KingfilesNet.py
@@ -11,7 +11,7 @@ class KingfilesNet(SimpleHoster):
__type__ = "hoster"
__version__ = "0.01"
- __pattern__ = r'http://(?:www\.)?kingfiles\.net/\w{12}'
+ __pattern__ = r'http://(?:www\.)?kingfiles\.net/(?P<ID>\w{12})'
__description__ = """Kingfiles.net hoster plugin"""
__author_name__ = ("zapp-brannigan", "Walter Purcaro")
@@ -23,7 +23,6 @@ class KingfilesNet(SimpleHoster):
OFFLINE_PATTERN = r'>(File Not Found</b><br><br>|File Not Found</h2>)'
- FILE_ID_PATTERN = r'<input type=\"hidden\" name=\"id\" value=\"(.+)\">'
RAND_ID_PATTERN = r'type=\"hidden\" name=\"rand\" value=\"(.+)\">'
LINK_PATTERN = r'var download_url = \'(.+)\';'
@@ -35,15 +34,10 @@ class KingfilesNet(SimpleHoster):
def handleFree(self):
- # Load main page and find file-id
- a = self.load(self.pyfile.url, cookies=True, decode=True)
- file_id = re.search(self.FILE_ID_PATTERN, a).group(1)
- self.logDebug("file_id", file_id)
-
# Click the free user button
post_data = {'op': "download1",
'usr_login': "",
- 'id': file_id,
+ 'id': file_info['ID'],
'fname': self.pyfile.name,
'referer': "",
'method_free': "+"}
diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py
index c95e52e73..18e0920fc 100644
--- a/module/plugins/hoster/XFileSharingPro.py
+++ b/module/plugins/hoster/XFileSharingPro.py
@@ -173,7 +173,7 @@ class XFileSharingPro(SimpleHoster):
self.html = self.load(self.pyfile.url, post=self.getPostParameters())
m = re.search(self.LINK_PATTERN, self.html)
if m is None:
- self.parseError('DIRECT LINK')
+ self.parseError('LINK_PATTERN not found')
self.startDownload(m.group(1))
@@ -194,7 +194,7 @@ class XFileSharingPro(SimpleHoster):
action, inputs = self.parseHtmlForm('F1')
if not inputs:
- self.parseError('TEXTAREA')
+ self.parseError('TEXTAREA not found')
self.logDebug(self.HOSTER_NAME, inputs)
if inputs['st'] == 'OK':
self.html = self.load(action, post=inputs)
@@ -206,7 +206,7 @@ class XFileSharingPro(SimpleHoster):
#get easybytez.com link for uploaded file
m = re.search(self.OVR_LINK_PATTERN, self.html)
if m is None:
- self.parseError('DIRECT LINK (OVR)')
+ self.parseError('OVR_LINK_PATTERN not found')
self.pyfile.url = m.group(1)
header = self.load(self.pyfile.url, just_header=True)
if 'location' in header: # Direct link
diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py
index 45e56ba42..b2fba0652 100644
--- a/module/plugins/internal/CaptchaService.py
+++ b/module/plugins/internal/CaptchaService.py
@@ -41,7 +41,7 @@ class CaptchaService:
return None
- def challenge(self, key):
+ def challenge(self, key=None):
raise NotImplementedError
@@ -83,7 +83,7 @@ class ReCaptcha(CaptchaService):
return None
- def challenge(self, key):
+ def challenge(self, key=None):
if not key:
if self.key:
key = self.key
@@ -143,7 +143,7 @@ class AdsCaptcha(CaptchaService):
return None
- def challenge(self, key): #: key is tuple(CaptchaId, PublicKey)
+ def challenge(self, key=None): #: key is tuple(CaptchaId, PublicKey)
if not key:
if self.key:
key = self.key
@@ -184,7 +184,7 @@ class SolveMedia(CaptchaService):
KEY_PATTERN = r'http://api\.solvemedia\.com/papi/challenge\.(no)?script\?k=(?P<KEY>.+?)"'
- def challenge(self, key):
+ def challenge(self, key=None):
if not key:
if self.key:
key = self.key