summaryrefslogtreecommitdiffstats
path: root/pyload
diff options
context:
space:
mode:
Diffstat (limited to 'pyload')
-rw-r--r--pyload/plugins/Plugin.py4
-rw-r--r--pyload/plugins/account/KingfilesNet.py2
-rw-r--r--pyload/plugins/account/RapiduNet.py46
-rw-r--r--pyload/plugins/account/SafesharingEu.py16
-rw-r--r--pyload/plugins/addon/SkipRev.py81
-rw-r--r--pyload/plugins/crypter/FilecryptCc.py2
-rw-r--r--pyload/plugins/crypter/Go4UpCom.py49
-rw-r--r--pyload/plugins/crypter/NCryptIn.py2
-rw-r--r--pyload/plugins/crypter/SafelinkingNet.py2
-rw-r--r--pyload/plugins/hoster/BitshareCom.py2
-rw-r--r--pyload/plugins/hoster/CatShareNet.py2
-rw-r--r--pyload/plugins/hoster/CrockoCom.py2
-rw-r--r--pyload/plugins/hoster/DateiTo.py2
-rw-r--r--pyload/plugins/hoster/DepositfilesCom.py2
-rw-r--r--pyload/plugins/hoster/DodanePl.py18
-rw-r--r--pyload/plugins/hoster/ExtabitCom.py2
-rw-r--r--pyload/plugins/hoster/FilecloudIo.py2
-rw-r--r--pyload/plugins/hoster/FilepostCom.py2
-rw-r--r--pyload/plugins/hoster/FilerNet.py2
-rw-r--r--pyload/plugins/hoster/FileserveCom.py2
-rw-r--r--pyload/plugins/hoster/FreakshareCom.py2
-rw-r--r--pyload/plugins/hoster/IfileIt.py2
-rw-r--r--pyload/plugins/hoster/Keep2shareCc.py2
-rw-r--r--pyload/plugins/hoster/LetitbitNet.py2
-rw-r--r--pyload/plugins/hoster/LoadTo.py2
-rw-r--r--pyload/plugins/hoster/LuckyShareNet.py2
-rw-r--r--pyload/plugins/hoster/MediafireCom.py2
-rw-r--r--pyload/plugins/hoster/NowDownloadSx.py (renamed from pyload/plugins/hoster/NowDownloadEu.py)15
-rw-r--r--pyload/plugins/hoster/NowVideoSx.py (renamed from pyload/plugins/hoster/NowVideoAt.py)14
-rw-r--r--pyload/plugins/hoster/OboomCom.py2
-rw-r--r--pyload/plugins/hoster/RapidgatorNet.py2
-rw-r--r--pyload/plugins/hoster/RapiduNet.py82
-rw-r--r--pyload/plugins/hoster/RyushareCom.py2
-rw-r--r--pyload/plugins/hoster/SafesharingEu.py25
-rw-r--r--pyload/plugins/hoster/ShareonlineBiz.py6
-rw-r--r--pyload/plugins/hoster/TurbobitNet.py2
-rw-r--r--pyload/plugins/hoster/UploadableCh.py90
-rw-r--r--pyload/plugins/hoster/UploadedTo.py2
-rw-r--r--pyload/plugins/hoster/UpstoreNet.py2
-rw-r--r--pyload/plugins/internal/Container.py2
-rw-r--r--pyload/plugins/internal/XFSHoster.py2
41 files changed, 458 insertions, 46 deletions
diff --git a/pyload/plugins/Plugin.py b/pyload/plugins/Plugin.py
index 279986746..ec13c54f4 100644
--- a/pyload/plugins/Plugin.py
+++ b/pyload/plugins/Plugin.py
@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-
+from __future__ import with_statement
+
from time import time, sleep
from random import randint
@@ -16,7 +18,7 @@ from itertools import islice
from traceback import print_exc
from urlparse import urlparse
-from pyload.utils import fs_decode, fs_encode, safe_join, safe_path
+from pyload.utils import fs_decode, fs_encode, safe_filename, safe_join
def chunks(iterable, size):
diff --git a/pyload/plugins/account/KingfilesNet.py b/pyload/plugins/account/KingfilesNet.py
index 892027e52..d49c7a320 100644
--- a/pyload/plugins/account/KingfilesNet.py
+++ b/pyload/plugins/account/KingfilesNet.py
@@ -2,7 +2,7 @@
import re
-from pyload.plugins.internal.CaptchaService import SolveMedia
+from pyload.plugins.internal.captcha import SolveMedia
from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
diff --git a/pyload/plugins/account/RapiduNet.py b/pyload/plugins/account/RapiduNet.py
new file mode 100644
index 000000000..6837f5c91
--- /dev/null
+++ b/pyload/plugins/account/RapiduNet.py
@@ -0,0 +1,46 @@
+# -*- coding: utf-8 -*-
+
+import re
+
+from pyload.plugins.internal.Account import Account
+from pyload.utils import json_loads
+
+
+class RapiduNet(Account):
+ __name__ = "RapiduNet"
+ __type__ = "account"
+ __version__ = "0.01"
+
+ __description__ = """Rapidu.net account plugin"""
+ __license__ = "GPLv3"
+ __authors__ = [("prOq", None)]
+
+
+ ACCOUNT_INFO_PATTERN = '<a href="premium/" style="padding-left: 0px;">Account: <b>(.*?)</b></a>'
+
+
+ def loadAccountInfo(self, user, req):
+ premium = False
+
+ req.load('https://rapidu.net/ajax.php?a=getChangeLang', post={"_go": "", "lang": "en"})
+ self.html = req.load('https://rapidu.net/', decode=True)
+
+ m = re.search(self.ACCOUNT_INFO_PATTERN, self.html)
+ if m:
+ if m.group(1) == "Premium":
+ premium = True
+
+ return {"validuntil": None, "trafficleft": None, "premium": premium}
+
+
+ def login(self, user, data, req):
+ try:
+ json = req.load('https://rapidu.net/ajax.php?a=getUserLogin', post={"_go": "", "login": user, "pass": data['password'], "member": "1"})
+ json = json_loads(json)
+ self.logDebug(json)
+
+ if not json['message'] == "success":
+ self.wrongPassword()
+ except Exception, e:
+ self.logError(e)
+
diff --git a/pyload/plugins/account/SafesharingEu.py b/pyload/plugins/account/SafesharingEu.py
new file mode 100644
index 000000000..bdc43bec7
--- /dev/null
+++ b/pyload/plugins/account/SafesharingEu.py
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+
+from pyload.plugins.internal.XFSAccount import XFSAccount
+
+
+class SafesharingEu(XFSAccount):
+ __name__ = "SafesharingEu"
+ __type__ = "account"
+ __version__ = "0.02"
+
+ __description__ = """Safesharing.eu account plugin"""
+ __license__ = "GPLv3"
+ __authors__ = [("guidobelix", "guidobelix@hotmail.it")]
+
+
+ HOSTER_DOMAIN = "safesharing.eu"
diff --git a/pyload/plugins/addon/SkipRev.py b/pyload/plugins/addon/SkipRev.py
new file mode 100644
index 000000000..0c14282a1
--- /dev/null
+++ b/pyload/plugins/addon/SkipRev.py
@@ -0,0 +1,81 @@
+# -*- coding: utf-8 -*-
+
+import re
+
+from urllib import unquote
+from urlparse import urljoin, urlparse
+
+from pyload.plugins.internal.Addon import Addon
+from pyload.plugins.Plugin import SkipDownload
+
+
+class SkipRev(Adoon):
+ __name__ = "SkipRev"
+ __type__ = "addon"
+ __version__ = "0.13"
+
+ __config__ = [("auto", "bool", "Automatically keep all rev files needed by package", True),
+ ("tokeep", "int" , "Min number of rev files to keep for package" , 1),
+ ("unskip", "bool", "Restart a skipped rev when download fails" , True)]
+
+ __description__ = """Skip files ending with extension rev"""
+ __license__ = "GPLv3"
+ __authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
+
+
+ def _setup(self):
+ super(self.pyfile.plugin, self).setup()
+ if self.pyfile.hasStatus("skipped"):
+ raise SkipDownload(self.pyfile.getStatusName() or self.pyfile.pluginname)
+
+
+ def pyname(self, pyfile):
+ url = pyfile.url
+ plugin = pyfile.plugin
+
+ if hasattr(plugin, "info") and 'name' in plugin.info and plugin.info['name']:
+ name = plugin.info['name']
+
+ elif hasattr(plugin, "parseInfo"):
+ name = next(plugin.parseInfo([url]))['name']
+
+ elif hasattr(plugin, "getInfo"): #@NOTE: if parseInfo was not found, getInfo should be missing too
+ name = plugin.getInfo(url)['name']
+
+ else:
+ self.logWarning("Unable to grab file name")
+ name = urlparse(unquote(url)).path.split('/')[-1])
+
+ return name
+
+
+ def downloadPreparing(self, pyfile):
+ if pyfile.getStatusName() is "unskipped" or not pyname(pyfile).endswith(".rev"):
+ return
+
+ tokeep = self.getConfig("tokeep")
+
+ if tokeep > 0:
+ saved = [True for link in pyfile.package().getChildren() \
+ if link.name.endswith(".rev") and (link.hasStatus("finished") or link.hasStatus("downloading"))].count(True)
+
+ if saved < tokeep:
+ return
+
+ pyfile.setCustomStatus("SkipRev", "skipped")
+ pyfile.plugin.setup = _setup #: work-around: inject status checker inside the preprocessing routine of the plugin
+
+
+ def downloadFailed(self, pyfile):
+ if self.getConfig("auto") is False:
+
+ if self.getConfig("unskip") is False:
+ return
+
+ if not pyfile.name.endswith(".rev"):
+ return
+
+ for link in pyfile.package().getChildren():
+ if link.hasStatus("skipped") and link.name.endswith(".rev"):
+ link.setCustomStatus("unskipped", "queued")
+ return
diff --git a/pyload/plugins/crypter/FilecryptCc.py b/pyload/plugins/crypter/FilecryptCc.py
index 160253c06..ee8076b17 100644
--- a/pyload/plugins/crypter/FilecryptCc.py
+++ b/pyload/plugins/crypter/FilecryptCc.py
@@ -6,7 +6,7 @@ import re
from Crypto.Cipher import AES
-from pyload.plugins.Crypter import Crypter
+from pyload.plugins.internal.Crypter import Crypter
class FilecryptCc(Crypter):
diff --git a/pyload/plugins/crypter/Go4UpCom.py b/pyload/plugins/crypter/Go4UpCom.py
new file mode 100644
index 000000000..f63695912
--- /dev/null
+++ b/pyload/plugins/crypter/Go4UpCom.py
@@ -0,0 +1,49 @@
+# -*- coding: utf-8 -*-
+
+import re
+
+from urlparse import urljoin
+
+from pyload.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
+
+
+class Go4UpCom(SimpleCrypter):
+ __name__ = "Go4UpCom"
+ __type__ = "crypter"
+ __version__ = "0.11"
+
+ __pattern__ = r'http://go4up\.com/(dl/\w{12}|rd/\w{12}/\d+)'
+
+ __description__ = """Go4Up.com decrypter plugin"""
+ __license__ = "GPLv3"
+ __authors__ = [("rlindner81", "rlindner81@gmail.com"),
+ ("Walter Purcaro", "vuolter@gmail.com")]
+
+
+ LINK_PATTERN = r'(http://go4up\.com/rd/.+?)<'
+
+ NAME_PATTERN = r'<title>Download (.+?)<'
+
+ OFFLINE_PATTERN = r'>\s*(404 Page Not Found|File not Found|Mirror does not exist)'
+
+
+ def getLinks(self
+ links = []
+
+ m = re.search(r'(/download/gethosts/.+?)"')
+ if m:
+ self.html = self.load(urljoin("http://go4up.com/", m.group(1)))
+ pages = [self.load(url) for url in re.findall(self.LINK_PATTERN, self.html)]
+ else:
+ pages = [self.html]
+
+ for html in pages:
+ try:
+ links.append(re.search(r'<b><a href="(.+?)"', html).group(1))
+ except:
+ continue
+
+ return links
+
+
+getInfo = create_getInfo(Go4UpCom)
diff --git a/pyload/plugins/crypter/NCryptIn.py b/pyload/plugins/crypter/NCryptIn.py
index b5b496a3f..15cfdaa03 100644
--- a/pyload/plugins/crypter/NCryptIn.py
+++ b/pyload/plugins/crypter/NCryptIn.py
@@ -7,7 +7,7 @@ import re
from Crypto.Cipher import AES
from pyload.plugins.internal.Crypter import Crypter
-from pyload.plugins.internal.CaptchaService import ReCaptcha
+from pyload.plugins.internal.captcha import ReCaptcha
class NCryptIn(Crypter):
diff --git a/pyload/plugins/crypter/SafelinkingNet.py b/pyload/plugins/crypter/SafelinkingNet.py
index 38eb36ea5..681e07cd1 100644
--- a/pyload/plugins/crypter/SafelinkingNet.py
+++ b/pyload/plugins/crypter/SafelinkingNet.py
@@ -8,7 +8,7 @@ from BeautifulSoup import BeautifulSoup
from pyload.utils import json_loads
from pyload.plugins.internal.Crypter import Crypter
-from pyload.plugins.internal.CaptchaService import SolveMedia
+from pyload.plugins.internal.captcha import SolveMedia
class SafelinkingNet(Crypter):
diff --git a/pyload/plugins/hoster/BitshareCom.py b/pyload/plugins/hoster/BitshareCom.py
index 02aa23036..0a6318c77 100644
--- a/pyload/plugins/hoster/BitshareCom.py
+++ b/pyload/plugins/hoster/BitshareCom.py
@@ -4,7 +4,7 @@ from __future__ import with_statement
import re
-from pyload.plugins.internal.CaptchaService import ReCaptcha
+from pyload.plugins.internal.captcha import ReCaptcha
from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
diff --git a/pyload/plugins/hoster/CatShareNet.py b/pyload/plugins/hoster/CatShareNet.py
index 089e137a0..63a550bd4 100644
--- a/pyload/plugins/hoster/CatShareNet.py
+++ b/pyload/plugins/hoster/CatShareNet.py
@@ -2,7 +2,7 @@
import re
-from pyload.plugins.internal.CaptchaService import ReCaptcha
+from pyload.plugins.internal.captcha import ReCaptcha
from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
diff --git a/pyload/plugins/hoster/CrockoCom.py b/pyload/plugins/hoster/CrockoCom.py
index 6d86741d2..ea87cce6d 100644
--- a/pyload/plugins/hoster/CrockoCom.py
+++ b/pyload/plugins/hoster/CrockoCom.py
@@ -2,7 +2,7 @@
import re
-from pyload.plugins.internal.CaptchaService import ReCaptcha
+from pyload.plugins.internal.captcha import ReCaptcha
from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
diff --git a/pyload/plugins/hoster/DateiTo.py b/pyload/plugins/hoster/DateiTo.py
index d22a0a3ce..bcd99ab0c 100644
--- a/pyload/plugins/hoster/DateiTo.py
+++ b/pyload/plugins/hoster/DateiTo.py
@@ -2,7 +2,7 @@
import re
-from pyload.plugins.internal.CaptchaService import ReCaptcha
+from pyload.plugins.internal.captcha import ReCaptcha
from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
diff --git a/pyload/plugins/hoster/DepositfilesCom.py b/pyload/plugins/hoster/DepositfilesCom.py
index 001fee199..e78e0bb27 100644
--- a/pyload/plugins/hoster/DepositfilesCom.py
+++ b/pyload/plugins/hoster/DepositfilesCom.py
@@ -4,7 +4,7 @@ import re
from urllib import unquote
-from pyload.plugins.internal.CaptchaService import ReCaptcha
+from pyload.plugins.internal.captcha import ReCaptcha
from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
diff --git a/pyload/plugins/hoster/DodanePl.py b/pyload/plugins/hoster/DodanePl.py
new file mode 100644
index 000000000..3f1ea3d6d
--- /dev/null
+++ b/pyload/plugins/hoster/DodanePl.py
@@ -0,0 +1,18 @@
+# -*- coding: utf-8 -*-
+
+from pyload.plugins.internal.DeadHoster import DeadHoster, create_getInfo
+
+
+class DodanePl(DeadHoster):
+ __name__ = "DodanePl"
+ __type__ = "hoster"
+ __version__ = "0.03"
+
+ __pattern__ = r'http://(?:www\.)?dodane\.pl/file/\d+'
+
+ __description__ = """Dodane.pl hoster plugin"""
+ __license__ = "GPLv3"
+ __authors__ = [("z00nx", "z00nx0@gmail.com")]
+
+
+getInfo = create_getInfo(DodanePl)
diff --git a/pyload/plugins/hoster/ExtabitCom.py b/pyload/plugins/hoster/ExtabitCom.py
index 6c0dbd185..04f78dafb 100644
--- a/pyload/plugins/hoster/ExtabitCom.py
+++ b/pyload/plugins/hoster/ExtabitCom.py
@@ -5,7 +5,7 @@ import re
from pyload.utils import json_loads
from pyload.plugins.hoster.UnrestrictLi import secondsToMidnight
-from pyload.plugins.internal.CaptchaService import ReCaptcha
+from pyload.plugins.internal.captcha import ReCaptcha
from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
diff --git a/pyload/plugins/hoster/FilecloudIo.py b/pyload/plugins/hoster/FilecloudIo.py
index 0c9f1b5ee..db1c0eee4 100644
--- a/pyload/plugins/hoster/FilecloudIo.py
+++ b/pyload/plugins/hoster/FilecloudIo.py
@@ -3,7 +3,7 @@
import re
from pyload.utils import json_loads
-from pyload.plugins.internal.CaptchaService import ReCaptcha
+from pyload.plugins.internal.captcha import ReCaptcha
from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
diff --git a/pyload/plugins/hoster/FilepostCom.py b/pyload/plugins/hoster/FilepostCom.py
index 5995b4aba..2948f3bc6 100644
--- a/pyload/plugins/hoster/FilepostCom.py
+++ b/pyload/plugins/hoster/FilepostCom.py
@@ -5,7 +5,7 @@ import re
from time import time
from pyload.utils import json_loads
-from pyload.plugins.internal.CaptchaService import ReCaptcha
+from pyload.plugins.internal.captcha import ReCaptcha
from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
diff --git a/pyload/plugins/hoster/FilerNet.py b/pyload/plugins/hoster/FilerNet.py
index d73467947..04b04219f 100644
--- a/pyload/plugins/hoster/FilerNet.py
+++ b/pyload/plugins/hoster/FilerNet.py
@@ -8,7 +8,7 @@ import re
from urlparse import urljoin
-from pyload.plugins.internal.CaptchaService import ReCaptcha
+from pyload.plugins.internal.captcha import ReCaptcha
from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
diff --git a/pyload/plugins/hoster/FileserveCom.py b/pyload/plugins/hoster/FileserveCom.py
index 0d0833038..9be6e53ab 100644
--- a/pyload/plugins/hoster/FileserveCom.py
+++ b/pyload/plugins/hoster/FileserveCom.py
@@ -7,7 +7,7 @@ from pyload.network.RequestFactory import getURL
from pyload.plugins.internal.Hoster import Hoster
from pyload.plugins.Plugin import chunks
from pyload.plugins.hoster.UnrestrictLi import secondsToMidnight
-from pyload.plugins.internal.CaptchaService import ReCaptcha
+from pyload.plugins.internal.captcha import ReCaptcha
from pyload.utils import parseFileSize
diff --git a/pyload/plugins/hoster/FreakshareCom.py b/pyload/plugins/hoster/FreakshareCom.py
index c298e5a24..ba4b7ddb0 100644
--- a/pyload/plugins/hoster/FreakshareCom.py
+++ b/pyload/plugins/hoster/FreakshareCom.py
@@ -4,7 +4,7 @@ import re
from pyload.plugins.internal.Hoster import Hoster
from pyload.plugins.hoster.UnrestrictLi import secondsToMidnight
-from pyload.plugins.internal.CaptchaService import ReCaptcha
+from pyload.plugins.internal.captcha import ReCaptcha
class FreakshareCom(Hoster):
diff --git a/pyload/plugins/hoster/IfileIt.py b/pyload/plugins/hoster/IfileIt.py
index 75c2f115c..b96734159 100644
--- a/pyload/plugins/hoster/IfileIt.py
+++ b/pyload/plugins/hoster/IfileIt.py
@@ -3,7 +3,7 @@
import re
from pyload.utils import json_loads
-from pyload.plugins.internal.CaptchaService import ReCaptcha
+from pyload.plugins.internal.captcha import ReCaptcha
from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
diff --git a/pyload/plugins/hoster/Keep2shareCc.py b/pyload/plugins/hoster/Keep2shareCc.py
index 6fef901d8..44587c946 100644
--- a/pyload/plugins/hoster/Keep2shareCc.py
+++ b/pyload/plugins/hoster/Keep2shareCc.py
@@ -4,7 +4,7 @@ import re
from urlparse import urljoin, urlparse
-from pyload.plugins.internal.CaptchaService import ReCaptcha
+from pyload.plugins.internal.captcha import ReCaptcha
from pyload.plugins.internal.SimpleHoster import _isDirectLink, SimpleHoster, create_getInfo
diff --git a/pyload/plugins/hoster/LetitbitNet.py b/pyload/plugins/hoster/LetitbitNet.py
index cdd339eb9..e13fe8a66 100644
--- a/pyload/plugins/hoster/LetitbitNet.py
+++ b/pyload/plugins/hoster/LetitbitNet.py
@@ -13,7 +13,7 @@ from urlparse import urljoin
from pyload.utils import json_loads, json_dumps
from pyload.plugins.hoster.UnrestrictLi import secondsToMidnight
-from pyload.plugins.internal.CaptchaService import ReCaptcha
+from pyload.plugins.internal.captcha import ReCaptcha
from pyload.plugins.internal.SimpleHoster import SimpleHoster
diff --git a/pyload/plugins/hoster/LoadTo.py b/pyload/plugins/hoster/LoadTo.py
index 3b7229a0b..af6c8b48e 100644
--- a/pyload/plugins/hoster/LoadTo.py
+++ b/pyload/plugins/hoster/LoadTo.py
@@ -6,7 +6,7 @@
import re
-from pyload.plugins.internal.CaptchaService import SolveMedia
+from pyload.plugins.internal.captcha import SolveMedia
from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
diff --git a/pyload/plugins/hoster/LuckyShareNet.py b/pyload/plugins/hoster/LuckyShareNet.py
index 9b418ccd4..a32ac6be9 100644
--- a/pyload/plugins/hoster/LuckyShareNet.py
+++ b/pyload/plugins/hoster/LuckyShareNet.py
@@ -4,7 +4,7 @@ import re
from bottle import json_loads
-from pyload.plugins.internal.CaptchaService import ReCaptcha
+from pyload.plugins.internal.captcha import ReCaptcha
from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
diff --git a/pyload/plugins/hoster/MediafireCom.py b/pyload/plugins/hoster/MediafireCom.py
index 246a5c87e..00e1e83cd 100644
--- a/pyload/plugins/hoster/MediafireCom.py
+++ b/pyload/plugins/hoster/MediafireCom.py
@@ -2,7 +2,7 @@
import re
-from pyload.plugins.internal.CaptchaService import SolveMedia
+from pyload.plugins.internal.captcha import SolveMedia
from pyload.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo
from pyload.network.RequestFactory import getURL
diff --git a/pyload/plugins/hoster/NowDownloadEu.py b/pyload/plugins/hoster/NowDownloadSx.py
index 2b1b8bc0a..1574de012 100644
--- a/pyload/plugins/hoster/NowDownloadEu.py
+++ b/pyload/plugins/hoster/NowDownloadSx.py
@@ -6,14 +6,14 @@ from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
from pyload.utils import fixup
-class NowDownloadEu(SimpleHoster):
- __name__ = "NowDownloadEu"
+class NowDownloadSx(SimpleHoster):
+ __name__ = "NowDownloadSx"
__type__ = "hoster"
__version__ = "0.05"
__pattern__ = r'http://(?:www\.)?nowdownload\.(at|ch|co|eu|sx)/(dl/|download\.php\?id=)\w+'
- __description__ = """NowDownload.at hoster plugin"""
+ __description__ = """NowDownload.sx hoster plugin"""
__license__ = "GPLv3"
__authors__ = [("godofdream", "soilfiction@gmail.com"),
("Walter Purcaro", "vuolter@gmail.com")]
@@ -25,14 +25,15 @@ class NowDownloadEu(SimpleHoster):
TOKEN_PATTERN = r'"(/api/token\.php\?token=\w+)"'
CONTINUE_PATTERN = r'"(/dl2/\w+/\w+)"'
WAIT_PATTERN = r'\.countdown\(\{until: \+(\d+),'
- LINK_PATTERN = r'"(http://f\d+\.nowdownload\.at/dl/\w+/\w+)'
+ LINK_PATTERN = r'(http://s\d+\.coolcdn\.info/nowdownload/.+?)["\']'
NAME_REPLACEMENTS = [("&#?\w+;", fixup), (r'<[^>]*>', '')]
def setup(self):
- self.multiDL = self.resumeDownload = True
- self.chunkLimit = -1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.chunkLimit = -1
def handleFree(self):
@@ -60,4 +61,4 @@ class NowDownloadEu(SimpleHoster):
self.download(str(url.group(1)))
-getInfo = create_getInfo(NowDownloadEu)
+getInfo = create_getInfo(NowDownloadSx)
diff --git a/pyload/plugins/hoster/NowVideoAt.py b/pyload/plugins/hoster/NowVideoSx.py
index 1ac9d19a3..4de1bfad7 100644
--- a/pyload/plugins/hoster/NowVideoAt.py
+++ b/pyload/plugins/hoster/NowVideoSx.py
@@ -5,14 +5,14 @@ import re
from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
-class NowVideoAt(SimpleHoster):
- __name__ = "NowVideoAt"
+class NowVideoSx(SimpleHoster):
+ __name__ = "NowVideoSx"
__type__ = "hoster"
- __version__ = "0.06"
+ __version__ = "0.07"
__pattern__ = r'http://(?:www\.)?nowvideo\.(at|ch|co|eu|sx)/(video|mobile/#/videos)/(?P<ID>\w+)'
- __description__ = """NowVideo.at hoster plugin"""
+ __description__ = """NowVideo.sx hoster plugin"""
__license__ = "GPLv3"
__authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
@@ -27,12 +27,12 @@ class NowVideoAt(SimpleHoster):
def setup(self):
- self.multiDL = True
self.resumeDownload = True
+ self.multiDL = True
def handleFree(self):
- self.html = self.load("http://www.nowvideo.at/mobile/video.php", get={'id': self.info['ID']})
+ self.html = self.load("http://www.nowvideo.at/mobile/video.php", get={'id': self.info['pattern']['ID']})
m = re.search(self.LINK_FREE_PATTERN, self.html)
if m is None:
@@ -41,4 +41,4 @@ class NowVideoAt(SimpleHoster):
self.download(m.group(1))
-getInfo = create_getInfo(NowVideoAt)
+getInfo = create_getInfo(NowVideoSx)
diff --git a/pyload/plugins/hoster/OboomCom.py b/pyload/plugins/hoster/OboomCom.py
index db2c0597b..0e907ab7a 100644
--- a/pyload/plugins/hoster/OboomCom.py
+++ b/pyload/plugins/hoster/OboomCom.py
@@ -7,7 +7,7 @@ import re
from pyload.utils import json_loads
from pyload.plugins.internal.Hoster import Hoster
-from pyload.plugins.internal.CaptchaService import ReCaptcha
+from pyload.plugins.internal.captcha import ReCaptcha
class OboomCom(Hoster):
diff --git a/pyload/plugins/hoster/RapidgatorNet.py b/pyload/plugins/hoster/RapidgatorNet.py
index 5deca9ddb..61efbcf20 100644
--- a/pyload/plugins/hoster/RapidgatorNet.py
+++ b/pyload/plugins/hoster/RapidgatorNet.py
@@ -7,7 +7,7 @@ from pycurl import HTTPHEADER
from pyload.utils import json_loads
from pyload.network.HTTPRequest import BadHeader
from pyload.plugins.hoster.UnrestrictLi import secondsToMidnight
-from pyload.plugins.internal.CaptchaService import AdsCaptcha, ReCaptcha, SolveMedia
+from pyload.plugins.internal.captcha import AdsCaptcha, ReCaptcha, SolveMedia
from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
diff --git a/pyload/plugins/hoster/RapiduNet.py b/pyload/plugins/hoster/RapiduNet.py
new file mode 100644
index 000000000..18e95804d
--- /dev/null
+++ b/pyload/plugins/hoster/RapiduNet.py
@@ -0,0 +1,82 @@
+# -*- coding: utf-8 -*-
+
+import re
+
+from pycurl import HTTPHEADER
+from time import time, altzone
+
+from pyload.utils import json_loads
+from pyload.plugins.captcha import ReCaptcha
+from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
+
+
+class RapiduNet(SimpleHoster):
+ __name__ = "RapiduNet"
+ __type__ = "hoster"
+ __version__ = "0.02"
+
+ __pattern__ = r'https?://(?:www\.)?rapidu\.net/(?P<ID>\d{10})'
+
+ __description__ = """Rapidu.net hoster plugin"""
+ __license__ = "GPLv3"
+ __authors__ = [("prOq", None)]
+
+
+ COOKIES = [("rapidu.net", "rapidu_lang", "en")]
+
+ FILE_INFO_PATTERN = r'<h1 title="(?P<N>.*)">.*</h1>\s*<small>(?P<S>\d+(\.\d+)?)\s(?P<U>\w+)</small>'
+ OFFLINE_PATTERN = r'404 - File not found'
+
+ ERROR_PATTERN = r'<div class="error">'
+
+ RECAPTCHA_KEY = r'6Ld12ewSAAAAAHoE6WVP_pSfCdJcBQScVweQh8Io'
+
+
+ def setup(self):
+ self.resumeDownload = True
+ self.multiDL = True
+ self.limitDL = 0 if self.premium else 2
+
+
+ def handleFree(self):
+ self.req.http.lastURL = self.pyfile.url
+ self.req.http.c.setopt(HTTPHEADER, ["X-Requested-With: XMLHttpRequest"])
+
+ jsvars = self.getJsonResponse("https://rapidu.net/ajax.php?a=getLoadTimeToDownload", {'_go': None})
+
+ if str(jsvars['timeToDownload']) is "stop":
+ t = (24 * 60 * 60) - (int(time()) % (24 *60 * 60)) + altzone
+
+ self.logInfo("You've reach your daily download transfer")
+
+ self.retry(10, 10 if t < 1 else None, "Try tomorrow again") #@NOTE: check t in case of not synchronised clock
+
+ else:
+ self.wait(int(jsvars['timeToDownload']) - int(time()))
+
+ recaptcha = ReCaptcha(self)
+
+ for _i in xrange(10):
+ challenge, code = recaptcha.challenge(self.RECAPTCHA_KEY)
+
+ jsvars = self.getJsonResponse("https://rapidu.net/ajax.php?a=getCheckCaptcha",
+ {'_go' : None,
+ 'captcha1': challenge,
+ 'captcha2': code,
+ 'fileId' : self.info['ID']})
+ if jsvars['message'] == 'success':
+ self.download(jsvars['url'])
+ break
+
+
+ def getJsonResponse(self, url, post_data):
+ response = self.load(url, post=post_data, decode=True)
+ if not response.startswith('{'):
+ self.retry()
+
+ self.logDebug(url, response)
+
+ return json_loads(response)
+
+
+getInfo = create_getInfo(RapiduNet)
diff --git a/pyload/plugins/hoster/RyushareCom.py b/pyload/plugins/hoster/RyushareCom.py
index ab6bf1017..8b08c9f51 100644
--- a/pyload/plugins/hoster/RyushareCom.py
+++ b/pyload/plugins/hoster/RyushareCom.py
@@ -6,7 +6,7 @@
import re
from pyload.plugins.internal.XFSHoster import XFSHoster, create_getInfo
-from pyload.plugins.internal.CaptchaService import SolveMedia
+from pyload.plugins.internal.captcha import SolveMedia
class RyushareCom(XFSHoster):
diff --git a/pyload/plugins/hoster/SafesharingEu.py b/pyload/plugins/hoster/SafesharingEu.py
new file mode 100644
index 000000000..730bfc692
--- /dev/null
+++ b/pyload/plugins/hoster/SafesharingEu.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+
+from pyload.plugins.internal.XFSHoster import XFSHoster, create_getInfo
+
+
+class SafesharingEu(XFSHoster):
+ __name__ = "SafesharingEu"
+ __type__ = "hoster"
+ __version__ = "0.05"
+
+ __pattern__ = r'https?://(?:www\.)?safesharing\.eu/\w{12}'
+
+ __description__ = """Safesharing.eu hoster plugin"""
+ __license__ = "GPLv3"
+ __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de")]
+
+
+ HOSTER_DOMAIN = "safesharing.eu"
+
+ WAIT_PATTERN = r'You have to wait (\d+) minutes'
+
+ ERROR_PATTERN = r'(?:<div class="alert alert-danger">)(.+?)(?:</div>)'
+
+
+getInfo = create_getInfo(SafesharingEu)
diff --git a/pyload/plugins/hoster/ShareonlineBiz.py b/pyload/plugins/hoster/ShareonlineBiz.py
index 1cb651b12..df89f7bed 100644
--- a/pyload/plugins/hoster/ShareonlineBiz.py
+++ b/pyload/plugins/hoster/ShareonlineBiz.py
@@ -6,9 +6,9 @@ from time import time
from urllib import unquote
from urlparse import urlparse
-from module.network.RequestFactory import getURL
-from module.plugins.internal.CaptchaService import ReCaptcha
-from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
+from pyload.network.RequestFactory import getURL
+from pyload.plugins.captcha import ReCaptcha
+from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class ShareonlineBiz(SimpleHoster):
diff --git a/pyload/plugins/hoster/TurbobitNet.py b/pyload/plugins/hoster/TurbobitNet.py
index 70844cadb..adb9d21a7 100644
--- a/pyload/plugins/hoster/TurbobitNet.py
+++ b/pyload/plugins/hoster/TurbobitNet.py
@@ -10,7 +10,7 @@ from pycurl import HTTPHEADER
from urllib import quote
from pyload.network.RequestFactory import getURL
-from pyload.plugins.internal.CaptchaService import ReCaptcha
+from pyload.plugins.internal.captcha import ReCaptcha
from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, timestamp
diff --git a/pyload/plugins/hoster/UploadableCh.py b/pyload/plugins/hoster/UploadableCh.py
new file mode 100644
index 000000000..0db7196bc
--- /dev/null
+++ b/pyload/plugins/hoster/UploadableCh.py
@@ -0,0 +1,90 @@
+# -*- coding: utf-8 -*-
+
+import re
+
+from time import sleep
+
+from pyload.plugins.captcha import ReCaptcha
+from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
+
+
+class UploadableCh(SimpleHoster):
+ __name__ = "UploadableCh"
+ __type__ = "hoster"
+ __version__ = "0.02"
+
+ __pattern__ = r'http://(?:www\.)?uploadable\.ch/file/(?P<ID>\w+)'
+
+ __description__ = """Uploadable.ch hoster plugin"""
+ __license__ = "GPLv3"
+ __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de"),
+ ("Walter Purcaro", "vuolter@gmail.com")]
+
+
+ FILE_INFO_PATTERN = r'div id=\"file_name\" title=.*>(?P<N>.+)<span class=\"filename_normal\">\((?P<S>[\d.]+) (?P<U>\w+)\)</span><'
+
+ OFFLINE_PATTERN = r'>(File not available|This file is no longer available)'
+ TEMP_OFFLINE_PATTERN = r'<div class="icon_err">'
+
+ WAIT_PATTERN = r'data-time="(\d+)" data-format'
+
+ FILE_URL_REPLACEMENTS = [(__pattern__ + ".*", r'http://www.uploadable.ch/file/\g<ID>')]
+
+
+ def setup(self):
+ self.multiDL = False
+ self.chunkLimit = 1
+
+
+ def handleFree(self):
+ # Click the "free user" button and wait
+ a = self.load(self.pyfile.url, cookies=True, post={'downloadLink': "wait"}, decode=True)
+ self.logDebug(a)
+
+ m = re.search(self.WAIT_PATTERN, a)
+ if m is not None:
+ self.wait(int(m.group(1))) #: Expected output: {"waitTime":30}
+ else:
+ self.error("WAIT_PATTERN")
+
+ # Make the recaptcha appear and show it the pyload interface
+ b = self.load(self.pyfile.url, cookies=True, post={'checkDownload': "check"}, decode=True)
+ self.logDebug(b) #: Expected output: {"success":"showCaptcha"}
+
+ recaptcha = ReCaptcha(self)
+
+ challenge, captcha = recaptcha.challenge(self.RECAPTCHA_KEY)
+
+ # Submit the captcha solution
+ self.load("http://www.uploadable.ch/checkReCaptcha.php",
+ cookies=True,
+ post={'recaptcha_challenge_field' : challenge,
+ 'recaptcha_response_field' : captcha,
+ 'recaptcha_shortencode_field': self.info['ID']},
+ decode=True)
+
+ self.wait(3)
+
+ # Get ready for downloading
+ self.load(self.pyfile.url, cookies=True, post={'downloadLink': "show"}, decode=True)
+
+ self.wait(3)
+
+ # Download the file
+ self.download(self.pyfile.url, cookies=True, post={'download': "normal"}, disposition=True)
+
+
+ def checkFile(self):
+ check = self.checkDownload({'wait_or_reconnect': re.compile("Please wait for"),
+ 'is_html' : re.compile("<head>")})
+
+ if check == "wait_or_reconnect":
+ self.logInfo("Downloadlimit reached, please wait or reconnect")
+ self.wait(60 * 60, True)
+ self.retry()
+
+ elif check == "is_html":
+ self.error("Downloaded file is an html file")
+
+
+getInfo = create_getInfo(UploadableCh)
diff --git a/pyload/plugins/hoster/UploadedTo.py b/pyload/plugins/hoster/UploadedTo.py
index ea55c3398..016f2c9cf 100644
--- a/pyload/plugins/hoster/UploadedTo.py
+++ b/pyload/plugins/hoster/UploadedTo.py
@@ -11,7 +11,7 @@ from time import sleep
from pyload.network.RequestFactory import getURL
from pyload.plugins.internal.Hoster import Hoster
from pyload.plugins.Plugin import chunks
-from pyload.plugins.internal.CaptchaService import ReCaptcha
+from pyload.plugins.internal.captcha import ReCaptcha
from pyload.utils import html_unescape, parseFileSize
diff --git a/pyload/plugins/hoster/UpstoreNet.py b/pyload/plugins/hoster/UpstoreNet.py
index 328b42b12..bd4241532 100644
--- a/pyload/plugins/hoster/UpstoreNet.py
+++ b/pyload/plugins/hoster/UpstoreNet.py
@@ -2,7 +2,7 @@
import re
-from pyload.plugins.internal.CaptchaService import ReCaptcha
+from pyload.plugins.internal.captcha import ReCaptcha
from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
diff --git a/pyload/plugins/internal/Container.py b/pyload/plugins/internal/Container.py
index b7dd3aa20..3320217ae 100644
--- a/pyload/plugins/internal/Container.py
+++ b/pyload/plugins/internal/Container.py
@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-
+from __future__ import with_statement
+
import re
from os import remove
diff --git a/pyload/plugins/internal/XFSHoster.py b/pyload/plugins/internal/XFSHoster.py
index a4e7339c5..b215b8211 100644
--- a/pyload/plugins/internal/XFSHoster.py
+++ b/pyload/plugins/internal/XFSHoster.py
@@ -8,7 +8,7 @@ from time import sleep
from pycurl import FOLLOWLOCATION, LOW_SPEED_TIME
from pyload.plugins.hoster.UnrestrictLi import secondsToMidnight
-from pyload.plugins.internal.CaptchaService import ReCaptcha, SolveMedia
+from pyload.plugins.internal.captcha import ReCaptcha, SolveMedia
from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
from pyload.utils import html_unescape