diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-03-26 18:15:41 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-03-26 18:15:41 +0100 |
commit | 181ab47c5f775b8b48569361da6b88a801784a30 (patch) | |
tree | f5f6d1d6b75b7f21b89b33733c3536e5ca80e087 /module/plugins/hoster | |
parent | Merge branch 'stable' into 0.4.10 (diff) | |
download | pyload-181ab47c5f775b8b48569361da6b88a801784a30.tar.xz |
Cleanup
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r-- | module/plugins/hoster/MegaRapidoNet.py | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/module/plugins/hoster/MegaRapidoNet.py b/module/plugins/hoster/MegaRapidoNet.py deleted file mode 100644 index b38374646..000000000 --- a/module/plugins/hoster/MegaRapidoNet.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- - -from random import randint - -from module.plugins.internal.MultiHoster import MultiHoster - - -def random_with_N_digits(n): - rand = "0." - not_zero = 0 - for i in range(1,n+1): - r = randint(0,9) - if(r > 0): - not_zero += 1 - rand += str(r) - - if not_zero > 0: - return rand - else: - return random_with_N_digits(n) - - -class MegaRapidoNet(MultiHoster): - __name__ = "MegaRapidoNet" - __type__ = "hoster" - __version__ = "0.02" - - __pattern__ = r'http://(?:www\.)?\w+\.megarapido\.net/\?file=\w+' - __config__ = [("use_premium", "bool", "Use premium account if available", True)] - - __description__ = """MegaRapido.net multi-hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] - - - LINK_PREMIUM_PATTERN = r'<\s*?a[^>]*?title\s*?=\s*?["\'][^"\']*?download["\'][^>]*?href=["\']([^"\']*)' - - ERROR_PATTERN = r'<\s*?div[^>]*?class\s*?=\s*?["\']?alert-message error[^>]*>([^<]*)' - - - def handlePremium(self, pyfile): - self.html = self.load("http://megarapido.net/gerar.php", - post={'rand' :random_with_N_digits(16), - 'urllist' : pyfile.url, - 'links' : pyfile.url, - 'exibir' : "normal", - 'usar' : "premium", - 'user' : self.account.getAccountInfo(self.user).get('sid', None), - 'autoreset': ""}) - - if "desloga e loga novamente para gerar seus links" in self.html.lower(): - self.error("You have logged in at another place") - - return super(MegaRapidoNet, self).handlePremium(pyfile) |