summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/accounts/FileserveCom.py2
-rw-r--r--module/plugins/accounts/HotfileCom.py2
-rw-r--r--module/plugins/captcha/captcha.py2
-rw-r--r--module/plugins/crypter/DDLMusicOrg.py2
-rw-r--r--module/plugins/crypter/HoerbuchIn.py2
-rw-r--r--module/plugins/crypter/SecuredIn.py302
-rw-r--r--module/plugins/hoster/DepositfilesCom.py4
-rw-r--r--module/plugins/hoster/FileserveCom.py58
-rw-r--r--module/plugins/hoster/FreakshareNet.py12
-rw-r--r--module/plugins/hoster/HotfileCom.py2
-rw-r--r--module/plugins/hoster/MegauploadCom.py4
-rw-r--r--module/plugins/hoster/MegavideoCom.py10
-rw-r--r--module/plugins/hoster/NetloadIn.py20
-rw-r--r--module/plugins/hoster/PornhostCom.py10
-rw-r--r--module/plugins/hoster/PornhubCom.py8
-rw-r--r--module/plugins/hoster/RapidshareCom.py10
-rw-r--r--module/plugins/hoster/RedtubeCom.py8
-rw-r--r--module/plugins/hoster/ShareCx.py16
-rw-r--r--module/plugins/hoster/ShragleCom.py10
-rw-r--r--module/plugins/hoster/UploadedTo.py2
-rw-r--r--module/plugins/hoster/YoupornCom.py10
-rw-r--r--module/plugins/hoster/YoutubeCom.py2
-rw-r--r--module/plugins/hoster/ZippyshareCom.py6
23 files changed, 250 insertions, 254 deletions
diff --git a/module/plugins/accounts/FileserveCom.py b/module/plugins/accounts/FileserveCom.py
index a9b222a6a..4e865b360 100644
--- a/module/plugins/accounts/FileserveCom.py
+++ b/module/plugins/accounts/FileserveCom.py
@@ -48,7 +48,7 @@ class FileserveCom(Account):
out.update(tmp)
return out
except:
- return Account.getAccountInfo(user)
+ return Account.getAccountInfo(self, user)
def login(self, user, data):
req = self.core.requestFactory.getRequest(self.__name__, user)
diff --git a/module/plugins/accounts/HotfileCom.py b/module/plugins/accounts/HotfileCom.py
index e6e8ba517..0d3e6620f 100644
--- a/module/plugins/accounts/HotfileCom.py
+++ b/module/plugins/accounts/HotfileCom.py
@@ -54,7 +54,7 @@ class HotfileCom(Account):
out.update(tmp)
return out
except:
- return Account.getAccountInfo(user)
+ return Account.getAccountInfo(self, user)
def apiCall(self, method, post={}, user=None):
if user:
diff --git a/module/plugins/captcha/captcha.py b/module/plugins/captcha/captcha.py
index d8c2aa38d..60b81a2cf 100644
--- a/module/plugins/captcha/captcha.py
+++ b/module/plugins/captcha/captcha.py
@@ -114,7 +114,7 @@ class OCR(object):
except:
pass
- def get_captcha(self):
+ def get_captcha(self, name):
raise NotImplementedError
def to_greyscale(self):
diff --git a/module/plugins/crypter/DDLMusicOrg.py b/module/plugins/crypter/DDLMusicOrg.py
index a82fa5a1c..f7cc996d0 100644
--- a/module/plugins/crypter/DDLMusicOrg.py
+++ b/module/plugins/crypter/DDLMusicOrg.py
@@ -21,7 +21,7 @@ class DDLMusicOrg(Crypter):
def decrypt(self, pyfile):
html = self.req.load(self.pyfile.url, cookies=True)
- if re.search(r"Wer dies nicht rechnen kann", html) != None:
+ if re.search(r"Wer dies nicht rechnen kann", html) is not None:
self.offline()
math = re.search(r"(\d+) ([\+-]) (\d+) =\s+<inp", self.html)
diff --git a/module/plugins/crypter/HoerbuchIn.py b/module/plugins/crypter/HoerbuchIn.py
index a40e5104b..7dd52ba40 100644
--- a/module/plugins/crypter/HoerbuchIn.py
+++ b/module/plugins/crypter/HoerbuchIn.py
@@ -27,7 +27,7 @@ class HoerbuchIn(Crypter):
""" returns True or False
"""
self.download_html()
- if re.search(r"Download", self.html) != None:
+ if re.search(r"Download", self.html) is not None:
return True
return False
diff --git a/module/plugins/crypter/SecuredIn.py b/module/plugins/crypter/SecuredIn.py
index 5a246075f..ef2ac5956 100644
--- a/module/plugins/crypter/SecuredIn.py
+++ b/module/plugins/crypter/SecuredIn.py
@@ -84,19 +84,19 @@ class SecuredIn(Crypter):
0x02e5b9c5, 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41, 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915, 0xd60f573f, 0xbc9bc6e4,
0x2b60a476, 0x81e67400, 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, 0x53b02d5d,
0xa99f8fa1, 0x08ba4799, 0x6e85076a
- ]
-
+ ]
+
self.olkemfjq = [
0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89, 0x452821e6, 0x38d01377, 0xbe5466cf,
0x34e90c6c, 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, 0x9216d5d9, 0x8979fb1b
- ]
-
+ ]
+
self.oqlaoymh = 0
self.oqmykrna = 0
self.pqmyzkid = 0
self.pldmjnde = 0
- self.ldiwkqly = 0
-
+ self.ldiwkqly = 0
+
self.plkodnyq = [
0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe, 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e,
0xc700c47b, 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8, 0x530ff8ee, 0x468dde7d,
@@ -122,10 +122,10 @@ class SecuredIn(Crypter):
0xcd769c2b, 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060, 0x85cbfe4e, 0x8ae88dd8,
0x7aaaf9b0, 0x4cf9aa7e, 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, 0xb74e6132,
0xce77e25b, 0x578fdfe3, 0x3ac372e6
- ]
-
- self.pnjzokye = None
-
+ ]
+
+ self.pnjzokye = None
+
self.thdlpsmy = [
0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, 0xd4082471, 0x3320f46a, 0x43b7d4b7,
0x500061af, 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, 0xbfbc09ec, 0x03bd9785,
@@ -151,8 +151,8 @@ class SecuredIn(Crypter):
0xce591d76, 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc, 0xed545578, 0x08fca5b5,
0xd83d7cd3, 0x4dad0fc4, 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, 0xd79a3234,
0x92638212, 0x670efa8e, 0x406000e0
- ]
-
+ ]
+
self.ybghjtik = [
0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, 0xecaa8c71, 0x699a17ff, 0x5664526c,
0xc2b19ee1, 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6, 0xa1d29c07, 0xefe830f5,
@@ -180,155 +180,155 @@ class SecuredIn(Crypter):
0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7
]
- def cypher(self, code):
- return self.lskdqpyr(code, "")
-
+ def cypher(self, code):
+ return self.lskdqpyr(code, "")
+
def lskdqpyr(self, alokfmth, yoaksjdh):
- if self.pnjzokye == None or self.pnjzokye.lower() == yoaksjdh:
- self.yoliukev(yoaksjdh)
- self.pnjzokye = yoaksjdh
- alokfmth = self.plaomtje(alokfmth)
- ykaiumgp = ""
- alokijuh = len(alokfmth)
- lokimyas = self.ylomiktb(alokfmth[0:8])
- palsiuzt = lokimyas[0]
- tzghbndf = lokimyas[1]
- awsedrft = [None, None]
- for kiujzhqa in range(8, alokijuh, 8):
- lokimyas = self.ylomiktb(alokfmth[kiujzhqa:kiujzhqa+8])
- awsedrft[0] = lokimyas[0]
- awsedrft[1] = lokimyas[1]
- lokimyas = self.okaqnhlp(lokimyas[0], lokimyas[1])
- lokimyas[0] ^= palsiuzt
- lokimyas[1] ^= tzghbndf
- palsiuzt = awsedrft[0]
- tzghbndf = awsedrft[1]
- ykaiumgp += self.ykijmtkd(lokimyas)
- return ykaiumgp
-
+ if self.pnjzokye is None or self.pnjzokye.lower() == yoaksjdh:
+ self.yoliukev(yoaksjdh)
+ self.pnjzokye = yoaksjdh
+ alokfmth = self.plaomtje(alokfmth)
+ ykaiumgp = ""
+ alokijuh = len(alokfmth)
+ lokimyas = self.ylomiktb(alokfmth[0:8])
+ palsiuzt = lokimyas[0]
+ tzghbndf = lokimyas[1]
+ awsedrft = [None, None]
+ for kiujzhqa in range(8, alokijuh, 8):
+ lokimyas = self.ylomiktb(alokfmth[kiujzhqa:kiujzhqa+8])
+ awsedrft[0] = lokimyas[0]
+ awsedrft[1] = lokimyas[1]
+ lokimyas = self.okaqnhlp(lokimyas[0], lokimyas[1])
+ lokimyas[0] ^= palsiuzt
+ lokimyas[1] ^= tzghbndf
+ palsiuzt = awsedrft[0]
+ tzghbndf = awsedrft[1]
+ ykaiumgp += self.ykijmtkd(lokimyas)
+ return ykaiumgp
+
def okaqnhlp(self, lahgrnvp, trenlpys):
- ujhaqylw = 0
- for yalmhopr in range(17, 1, -1):
- lahgrnvp ^= self.ldiwkqly[yalmhopr]
- trenlpys ^= (self.oqlaoymh[lahgrnvp >> 24 & 0xff] + self.oqmykrna[lahgrnvp >> 16 & 0xff] ^ self.pqmyzkid[lahgrnvp >> 8 & 0xff]) + self.pldmjnde[lahgrnvp & 0xff]
- ujhaqylw = lahgrnvp
- lahgrnvp = trenlpys
- trenlpys = ujhaqylw
- ujhaqylw = lahgrnvp
- lahgrnvp = trenlpys
- trenlpys = ujhaqylw
- trenlpys ^= self.ldiwkqly[1]
- lahgrnvp ^= self.ldiwkqly[0]
- return [lahgrnvp, trenlpys]
-
+ ujhaqylw = 0
+ for yalmhopr in range(17, 1, -1):
+ lahgrnvp ^= self.ldiwkqly[yalmhopr]
+ trenlpys ^= (self.oqlaoymh[lahgrnvp >> 24 & 0xff] + self.oqmykrna[lahgrnvp >> 16 & 0xff] ^ self.pqmyzkid[lahgrnvp >> 8 & 0xff]) + self.pldmjnde[lahgrnvp & 0xff]
+ ujhaqylw = lahgrnvp
+ lahgrnvp = trenlpys
+ trenlpys = ujhaqylw
+ ujhaqylw = lahgrnvp
+ lahgrnvp = trenlpys
+ trenlpys = ujhaqylw
+ trenlpys ^= self.ldiwkqly[1]
+ lahgrnvp ^= self.ldiwkqly[0]
+ return [lahgrnvp, trenlpys]
+
def plaomtje(self, yoiumqpy):
- qkailkzt = ""
- xoliuzem = 0
- lyomiujt = 0
- yploemju = -1
- for i in range(0, len(yoiumqpy)):
- yploamzu = ord(yoiumqpy[i])
- if ord('A') <= yploamzu and yploamzu <= ord('Z'):
- xoliuzem = ord(yoiumqpy[i]) - 65
- elif ord('a') <= yploamzu and yploamzu <= ord('z'):
- xoliuzem = ord(yoiumqpy[i]) - 97 + 26
- elif ord('0') <= yploamzu and yploamzu <= ord('9'):
- xoliuzem = ord(yoiumqpy[i]) - 48 + 52
- elif yploamzu == ord('+'):
- xoliuzem = 62
- elif yploamzu == ord('/'):
- xoliuzem = 63
- else:
- continue
- yploemju += 1
-
- lxkdmizj = 0
- switch = yploemju % 4
- if switch == 0:
- lyomiujt = xoliuzem
- continue
- elif switch == 1:
- lxkdmizj = lyomiujt << 2 | xoliuzem >> 4
- lyomiujt = xoliuzem & 0x0F
- elif switch == 2:
- lxkdmizj = lyomiujt << 4 | xoliuzem >> 2
- lyomiujt = xoliuzem & 0x03
- elif switch == 3:
- lxkdmizj = lyomiujt << 6 | xoliuzem >> 0
- lyomiujt = xoliuzem & 0x00
- qkailkzt += unichr(lxkdmizj)
- return qkailkzt
-
+ qkailkzt = ""
+ xoliuzem = 0
+ lyomiujt = 0
+ yploemju = -1
+ for i in range(0, len(yoiumqpy)):
+ yploamzu = ord(yoiumqpy[i])
+ if ord('A') <= yploamzu and yploamzu <= ord('Z'):
+ xoliuzem = ord(yoiumqpy[i]) - 65
+ elif ord('a') <= yploamzu and yploamzu <= ord('z'):
+ xoliuzem = ord(yoiumqpy[i]) - 97 + 26
+ elif ord('0') <= yploamzu and yploamzu <= ord('9'):
+ xoliuzem = ord(yoiumqpy[i]) - 48 + 52
+ elif yploamzu == ord('+'):
+ xoliuzem = 62
+ elif yploamzu == ord('/'):
+ xoliuzem = 63
+ else:
+ continue
+ yploemju += 1
+
+ lxkdmizj = 0
+ switch = yploemju % 4
+ if switch == 0:
+ lyomiujt = xoliuzem
+ continue
+ elif switch == 1:
+ lxkdmizj = lyomiujt << 2 | xoliuzem >> 4
+ lyomiujt = xoliuzem & 0x0F
+ elif switch == 2:
+ lxkdmizj = lyomiujt << 4 | xoliuzem >> 2
+ lyomiujt = xoliuzem & 0x03
+ elif switch == 3:
+ lxkdmizj = lyomiujt << 6 | xoliuzem >> 0
+ lyomiujt = xoliuzem & 0x00
+ qkailkzt += unichr(lxkdmizj)
+ return qkailkzt
+
def qmyjuila(self, oqlamykt, yalkionj):
- dolizmvw = 0
- for iumswkya in range(0, 16):
- oqlamykt ^= self.ldiwkqly[iumswkya]
- yalkionj ^= (self.oqlaoymh[oqlamykt >> 24 & 0xff] + self.oqmykrna[oqlamykt >> 16 & 0xff] ^ self.pqmyzkid[oqlamykt >> 8 & 0xff]) + self.pldmjnde[oqlamykt & 0xff]
- dolizmvw = oqlamykt
- oqlamykt = yalkionj
- yalkionj = dolizmvw
- dolizmvw = oqlamykt
- oqlamykt = yalkionj
- yalkionj = dolizmvw
- yalkionj ^= self.ldiwkqly[16]
- oqlamykt ^= self.ldiwkqly[17]
- return [oqlamykt, yalkionj]
-
+ dolizmvw = 0
+ for iumswkya in range(0, 16):
+ oqlamykt ^= self.ldiwkqly[iumswkya]
+ yalkionj ^= (self.oqlaoymh[oqlamykt >> 24 & 0xff] + self.oqmykrna[oqlamykt >> 16 & 0xff] ^ self.pqmyzkid[oqlamykt >> 8 & 0xff]) + self.pldmjnde[oqlamykt & 0xff]
+ dolizmvw = oqlamykt
+ oqlamykt = yalkionj
+ yalkionj = dolizmvw
+ dolizmvw = oqlamykt
+ oqlamykt = yalkionj
+ yalkionj = dolizmvw
+ yalkionj ^= self.ldiwkqly[16]
+ oqlamykt ^= self.ldiwkqly[17]
+ return [oqlamykt, yalkionj]
+
def ykijmtkd(self, yoirlkqw):
- loipamyu = len(yoirlkqw)
- yoirlkqwchar = []
- for ymujtnbq in range(0, loipamyu):
- yoir = [yoirlkqw[ymujtnbq] >> 24 & 0xff, yoirlkqw[ymujtnbq] >> 16 & 0xff, yoirlkqw[ymujtnbq] >> 8 & 0xff, yoirlkqw[ymujtnbq] & 0xff]
- for c in yoir:
- yoirlkqwchar.append(chr(c))
- return "".join(yoirlkqwchar)
-
+ loipamyu = len(yoirlkqw)
+ yoirlkqwchar = []
+ for ymujtnbq in range(0, loipamyu):
+ yoir = [yoirlkqw[ymujtnbq] >> 24 & 0xff, yoirlkqw[ymujtnbq] >> 16 & 0xff, yoirlkqw[ymujtnbq] >> 8 & 0xff, yoirlkqw[ymujtnbq] & 0xff]
+ for c in yoir:
+ yoirlkqwchar.append(chr(c))
+ return "".join(yoirlkqwchar)
+
def ylomiktb(self, lofiuzmq):
- plokimqw = int(ceil(len(lofiuzmq) / 4.0))
+ plokimqw = int(ceil(len(lofiuzmq) / 4.0))
lopkisdq = []
- for ypoqlktz in range(0, plokimqw):
+ for ypoqlktz in range(0, plokimqw):
lopkisdq.append(ord(lofiuzmq[(ypoqlktz << 2) + 3]) + (ord(lofiuzmq[(ypoqlktz << 2) + 2]) << 8) + (ord(lofiuzmq[(ypoqlktz << 2) + 1]) << 16) + (ord(lofiuzmq[(ypoqlktz << 2)]) << 24))
- return lopkisdq
-
+ return lopkisdq
+
def yoliukev(self, kaiumylq):
- self.oqlaoymh = self.iatwbfrd
- self.oqmykrna = self.ybghjtik
- self.pqmyzkid = self.thdlpsmy
- self.pldmjnde = self.plkodnyq
-
- yaqpolft = [0 for i in range(len(kaiumylq))]
-
+ self.oqlaoymh = self.iatwbfrd
+ self.oqmykrna = self.ybghjtik
+ self.pqmyzkid = self.thdlpsmy
+ self.pldmjnde = self.plkodnyq
+
+ yaqpolft = [0 for i in range(len(kaiumylq))]
+
yaqwsedr = 0
- btzqwsay = 0
- while yaqwsedr < len(kaiumylq):
- wlqoakmy = 0
- for lopiuztr in range(0, 4):
- wlqoakmy = wlqoakmy << 8 | ord(kaiumylq[yaqwsedr % len(kaiumylq)])
- yaqwsedr += 1
+ btzqwsay = 0
+ while yaqwsedr < len(kaiumylq):
+ wlqoakmy = 0
+ for lopiuztr in range(0, 4):
+ wlqoakmy = wlqoakmy << 8 | ord(kaiumylq[yaqwsedr % len(kaiumylq)])
+ yaqwsedr += 1
yaqpolft[btzqwsay] = wlqoakmy
- btzqwsay += 1
- self.ldiwkqly = []
- for btzqwsay in range(0, 18):
- self.ldiwkqly.append(self.olkemfjq[btzqwsay])
- yalopiuq = [0, 0]
- for btzqwsay in range(0, 18, 2):
- yalopiuq = self.qmyjuila(yalopiuq[0], yalopiuq[1])
- self.ldiwkqly[btzqwsay] = yalopiuq[0]
- self.ldiwkqly[btzqwsay + 1] = yalopiuq[1]
- for btzqwsay in range(0, 256, 2):
- yalopiuq = self.qmyjuila(yalopiuq[0], yalopiuq[1])
- self.oqlaoymh[btzqwsay] = yalopiuq[0]
- self.oqlaoymh[btzqwsay + 1] = yalopiuq[1]
- for btzqwsay in range(0, 256, 2):
- yalopiuq = self.qmyjuila(yalopiuq[0], yalopiuq[1])
- self.oqmykrna[btzqwsay] = yalopiuq[0]
- self.oqmykrna[btzqwsay + 1] = yalopiuq[1]
- for btzqwsay in range(0, 256, 2):
- yalopiuq = self.qmyjuila(yalopiuq[0], yalopiuq[1])
- self.pqmyzkid[btzqwsay] = yalopiuq[0]
- self.pqmyzkid[btzqwsay + 1] = yalopiuq[1]
- for btzqwsay in range(0, 256, 2):
- yalopiuq = self.qmyjuila(yalopiuq[0], yalopiuq[1])
- self.pldmjnde[btzqwsay] = yalopiuq[0]
+ btzqwsay += 1
+ self.ldiwkqly = []
+ for btzqwsay in range(0, 18):
+ self.ldiwkqly.append(self.olkemfjq[btzqwsay])
+ yalopiuq = [0, 0]
+ for btzqwsay in range(0, 18, 2):
+ yalopiuq = self.qmyjuila(yalopiuq[0], yalopiuq[1])
+ self.ldiwkqly[btzqwsay] = yalopiuq[0]
+ self.ldiwkqly[btzqwsay + 1] = yalopiuq[1]
+ for btzqwsay in range(0, 256, 2):
+ yalopiuq = self.qmyjuila(yalopiuq[0], yalopiuq[1])
+ self.oqlaoymh[btzqwsay] = yalopiuq[0]
+ self.oqlaoymh[btzqwsay + 1] = yalopiuq[1]
+ for btzqwsay in range(0, 256, 2):
+ yalopiuq = self.qmyjuila(yalopiuq[0], yalopiuq[1])
+ self.oqmykrna[btzqwsay] = yalopiuq[0]
+ self.oqmykrna[btzqwsay + 1] = yalopiuq[1]
+ for btzqwsay in range(0, 256, 2):
+ yalopiuq = self.qmyjuila(yalopiuq[0], yalopiuq[1])
+ self.pqmyzkid[btzqwsay] = yalopiuq[0]
+ self.pqmyzkid[btzqwsay + 1] = yalopiuq[1]
+ for btzqwsay in range(0, 256, 2):
+ yalopiuq = self.qmyjuila(yalopiuq[0], yalopiuq[1])
+ self.pldmjnde[btzqwsay] = yalopiuq[0]
self.pldmjnde[btzqwsay + 1] = yalopiuq[1]
diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py
index c91341887..28d0819d7 100644
--- a/module/plugins/hoster/DepositfilesCom.py
+++ b/module/plugins/hoster/DepositfilesCom.py
@@ -32,12 +32,12 @@ class DepositfilesCom(Hoster):
self.download(link)
def handleFree(self):
- if re.search(r'File is checked, please try again in a minute.', self.html) != None:
+ if re.search(r'File is checked, please try again in a minute.', self.html) is not None:
self.log.info("DepositFiles.com: The file is being checked. Waiting 1 minute.")
self.setWait(61)
self.wait()
- if re.search(r'Such file does not exist or it has been removed for infringement of copyrights', self.html) != None:
+ if re.search(r'Such file does not exist or it has been removed for infringement of copyrights', self.html) is not None:
self.offline()
self.html = self.load(self.pyfile.url, post={"gateway_result":"1"})
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py
index ff09d9a0a..753baa800 100644
--- a/module/plugins/hoster/FileserveCom.py
+++ b/module/plugins/hoster/FileserveCom.py
@@ -2,26 +2,26 @@
import re
from module.plugins.Hoster import Hoster
-from module.plugins.ReCaptcha import ReCaptcha
-
+from module.plugins.ReCaptcha import ReCaptcha
+
from module.network.Request import getURL
-
-def getInfo(urls):
- result = []
-
- for url in urls:
+
+def getInfo(urls):
+ result = []
+
+ for url in urls:
html = getURL(url)
if re.search(r'<h1>File not available</h1>', html):
- result.append((url, 0, 1, url))
- continue
-
+ result.append((url, 0, 1, url))
+ continue
+
size = re.search(r"<span><strong>(.*?) MB</strong>", html).group(1)
- size = int(float(size)*1024*1024)
+ size = int(float(size)*1024*1024)
- name = re.search('<h1>(.*?)<br/></h1>', html).group(1)
- result.append((name, size, 2, url))
-
- yield result
+ name = re.search('<h1>(.*?)<br/></h1>', html).group(1)
+ result.append((name, size, 2, url))
+
+ yield result
class FileserveCom(Hoster):
__name__ = "FileserveCom"
@@ -38,20 +38,20 @@ class FileserveCom(Hoster):
def process(self, pyfile):
self.html = self.load(self.pyfile.url, cookies=False if self.account else True)
- if re.search(r'<h1>File not available</h1>', self.html) != None:
- self.offline
+ if re.search(r'<h1>File not available</h1>', self.html) is not None:
+ self.offline()
self.pyfile.name = re.search('<h1>(.*?)<br/></h1>', self.html).group(1)
-
- if self.account:
- self.handlePremium()
- else:
- self.handleFree()
-
- def handlePremium(self):
- self.download(self.pyfile.url, post={"download":"premium"}, cookies=True)
-
- def handleFree(self):
+
+ if self.account:
+ self.handlePremium()
+ else:
+ self.handleFree()
+
+ def handlePremium(self):
+ self.download(self.pyfile.url, post={"download":"premium"}, cookies=True)
+
+ def handleFree(self):
if r'<div id="captchaArea" style="display:none;">' in self.html or \
r'/showCaptcha\(\);' in self.html:
@@ -72,11 +72,11 @@ class FileserveCom(Hoster):
wait_time = 30
m = re.search(r'<span>(.*?)\sSekunden</span>', html)
- if m != None:
+ if m is not None:
wait_time = int( m.group(1).split('.')[0] ) + 1
m = re.search(r'You need to wait (.*?) seconds to start another download.', html)
- if m != None:
+ if m is not None:
wait_time = int( m.group(1) )
self.wantReconnect = True
diff --git a/module/plugins/hoster/FreakshareNet.py b/module/plugins/hoster/FreakshareNet.py
index 1bb36737e..76a906ad2 100644
--- a/module/plugins/hoster/FreakshareNet.py
+++ b/module/plugins/hoster/FreakshareNet.py
@@ -37,7 +37,7 @@ class FreakshareNet(Hoster):
self.download_html()
if not self.file_exists():
- self.offline
+ self.offline()
self.setWait( self.get_waiting_time() )
@@ -54,7 +54,7 @@ class FreakshareNet(Hoster):
def get_file_url(self):
""" returns the absolute downloadable filepath
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
if not self.wantReconnect:
self.req_opts = self.get_download_options() # get the Post options for the Request
@@ -64,7 +64,7 @@ class FreakshareNet(Hoster):
self.offline()
def get_file_name(self):
- if self.html == None:
+ if self.html is None:
self.download_html()
if not self.wantReconnect:
file_name = re.search(r"<h1\sclass=\"box_heading\"\sstyle=\"text-align:center\;\">([^ ]+)", self.html).group(1)
@@ -73,7 +73,7 @@ class FreakshareNet(Hoster):
return self.pyfile.url
def get_waiting_time(self):
- if self.html == None:
+ if self.html is None:
self.download_html()
timestring = re.search('\s*var\stime\s=\s(\d*?)\.\d*;', self.html).group(1)
if timestring:
@@ -85,9 +85,9 @@ class FreakshareNet(Hoster):
def file_exists(self):
""" returns True or False
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
- if re.search(r"Sorry, this Download doesnt exist anymore", self.html) != None:
+ if re.search(r"Sorry, this Download doesnt exist anymore", self.html) is not None:
return False
else:
return True
diff --git a/module/plugins/hoster/HotfileCom.py b/module/plugins/hoster/HotfileCom.py
index 78128db1d..d5d255b1a 100644
--- a/module/plugins/hoster/HotfileCom.py
+++ b/module/plugins/hoster/HotfileCom.py
@@ -23,7 +23,7 @@ def getInfo(urls):
if fields[1] in ("1", "2"):
status = 2
- elif fields[1]:
+ else:
status = 1
result.append((fields[2], int(fields[3]), status, chunk[i]))
diff --git a/module/plugins/hoster/MegauploadCom.py b/module/plugins/hoster/MegauploadCom.py
index a14c2c76f..3e257d0b1 100644
--- a/module/plugins/hoster/MegauploadCom.py
+++ b/module/plugins/hoster/MegauploadCom.py
@@ -80,7 +80,7 @@ class MegauploadCom(Hoster):
captchacode = re.search('name="captchacode" value="(.*)"', self.html[0]).group(1)
megavar = re.search('name="megavar" value="(.*)">', self.html[0]).group(1)
self.html[1] = self.load(self.pyfile.url, post={"captcha": captcha, "captchacode": captchacode, "megavar": megavar})
- if re.search(r"Waiting time before each download begins", self.html[1]) != None:
+ if re.search(r"Waiting time before each download begins", self.html[1]) is not None:
break
def get_file_url(self):
@@ -94,7 +94,7 @@ class MegauploadCom(Hoster):
def file_exists(self):
self.download_html()
- if re.search(r"Unfortunately, the link you have clicked is not available.", self.html[0]) != None or \
+ if re.search(r"Unfortunately, the link you have clicked is not available.", self.html[0]) is not None or \
re.search(r"Download limit exceeded", self.html[0]):
return False
return True
diff --git a/module/plugins/hoster/MegavideoCom.py b/module/plugins/hoster/MegavideoCom.py
index 7ea045447..e4b41605b 100644
--- a/module/plugins/hoster/MegavideoCom.py
+++ b/module/plugins/hoster/MegavideoCom.py
@@ -27,7 +27,7 @@ class MegavideoCom(Hoster):
def get_file_url(self):
""" returns the absolute downloadable filepath
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
# get id
@@ -90,7 +90,7 @@ class MegavideoCom(Hoster):
return out.lower()
def get_file_name(self):
- if self.html == None:
+ if self.html is None:
self.download_html()
name = re.search("flashvars.title = \"(.*?)\";", self.html).group(1)
@@ -100,11 +100,11 @@ class MegavideoCom(Hoster):
def file_exists(self):
""" returns True or False
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
- if re.search(r"Dieses Video ist nicht verfügbar.", self.html) != None or \
- re.search(r"This video is unavailable.", self.html) != None:
+ if re.search(r"Dieses Video ist nicht verfügbar.", self.html) is not None or \
+ re.search(r"This video is unavailable.", self.html) is not None:
return False
else:
return True
diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py
index 6f0cb9461..dc5d2a028 100644
--- a/module/plugins/hoster/NetloadIn.py
+++ b/module/plugins/hoster/NetloadIn.py
@@ -28,7 +28,7 @@ def getInfo(urls):
api = getURL(apiurl+ids)
- if api == None or len(api) < 10:
+ if api is None or len(api) < 10:
print "Netload prefetch: failed "
return
if api.find("unknown_auth") >= 0:
@@ -111,7 +111,7 @@ class NetloadIn(Hoster):
if self.api_data["status"] == "online":
self.api_data["checksum"] = lines[4].strip()
else:
- self.offline();
+ self.offline()
else:
self.api_data["exists"] = False
else:
@@ -134,12 +134,12 @@ class NetloadIn(Hoster):
if self.getConf('dumpgen'):
print page
- if re.search(r"(We will prepare your download..)", page) != None:
+ if re.search(r"(We will prepare your download..)", page) is not None:
self.log.debug("Netload: We will prepare your download")
- self.final_wait(page);
+ self.final_wait(page)
return True
- if re.search(r"(We had a reqeust with the IP)", page) != None:
- wait = self.get_wait_time(page);
+ if re.search(r"(We had a reqeust with the IP)", page) is not None:
+ wait = self.get_wait_time(page)
if wait == 0:
self.log.debug("Netload: Wait was 0 setting 30")
wait = 30
@@ -149,7 +149,7 @@ class NetloadIn(Hoster):
self.wait()
link = re.search(r"You can download now your next file. <a href=\"(index.php\?id=10&amp;.*)\" class=\"Orange_Link\">Click here for the download</a>", page)
- if link != None:
+ if link is not None:
self.log.debug("Netload: Using new link found on page")
page = self.load("http://netload.in/" + link.group(1).replace("amp;", ""))
else:
@@ -172,7 +172,7 @@ class NetloadIn(Hoster):
file_id = re.search('<input name="file_id" type="hidden" value="(.*)" />', page).group(1)
if not captchawaited:
- wait = self.get_wait_time(page);
+ wait = self.get_wait_time(page)
self.log.info(_("Netload: waiting for captcha %d s." % wait))
self.setWait(wait)
self.wait()
@@ -189,13 +189,13 @@ class NetloadIn(Hoster):
try:
file_url_pattern = r"<a class=\"Orange_Link\" href=\"(http://.+)\" >Click here"
attempt = re.search(file_url_pattern, page)
- if attempt != None:
+ if attempt is not None:
return attempt.group(1)
else:
self.log.debug("Netload: Backup try for final link")
file_url_pattern = r"<a href=\"(.+)\" class=\"Orange_Link\">Click here"
attempt = re.search(file_url_pattern, page)
- return "http://netload.in/"+attempt.group(1);
+ return "http://netload.in/"+attempt.group(1)
except:
self.log.debug("Netload: Getting final link failed")
return None
diff --git a/module/plugins/hoster/PornhostCom.py b/module/plugins/hoster/PornhostCom.py
index 5dd681b5b..7a969f7f7 100644
--- a/module/plugins/hoster/PornhostCom.py
+++ b/module/plugins/hoster/PornhostCom.py
@@ -30,7 +30,7 @@ class PornhostCom(Hoster):
def get_file_url(self):
""" returns the absolute downloadable filepath
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
file_url = re.search(r'download this file</label>.*?<a href="(.*?)"', self.html)
@@ -46,7 +46,7 @@ class PornhostCom(Hoster):
return file_url
def get_file_name(self):
- if self.html == None:
+ if self.html is None:
self.download_html()
name = re.search(r'<title>pornhost\.com - free file hosting with a twist - gallery(.*?)</title>', self.html)
@@ -64,11 +64,11 @@ class PornhostCom(Hoster):
def file_exists(self):
""" returns True or False
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
- if re.search(r'gallery not found', self.html) != None \
- or re.search(r'You will be redirected to', self.html) != None:
+ if re.search(r'gallery not found', self.html) is not None \
+ or re.search(r'You will be redirected to', self.html) is not None:
return False
else:
return True
diff --git a/module/plugins/hoster/PornhubCom.py b/module/plugins/hoster/PornhubCom.py
index ea7e1423c..abc489e30 100644
--- a/module/plugins/hoster/PornhubCom.py
+++ b/module/plugins/hoster/PornhubCom.py
@@ -28,7 +28,7 @@ class PornhubCom(Hoster):
def get_file_url(self):
""" returns the absolute downloadable filepath
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
url = "http://www.pornhub.com//gateway.php"
@@ -46,7 +46,7 @@ class PornhubCom(Hoster):
return file_url
def get_file_name(self):
- if self.html == None:
+ if self.html is None:
self.download_html()
name = re.findall('<h1>(.*?)</h1>', self.html)[1] + ".flv"
@@ -56,10 +56,10 @@ class PornhubCom(Hoster):
def file_exists(self):
""" returns True or False
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
- if re.search(r'This video is no longer in our database or is in conversion', self.html) != None:
+ if re.search(r'This video is no longer in our database or is in conversion', self.html) is not None:
return False
else:
return True
diff --git a/module/plugins/hoster/RapidshareCom.py b/module/plugins/hoster/RapidshareCom.py
index f9af201cb..844d716ed 100644
--- a/module/plugins/hoster/RapidshareCom.py
+++ b/module/plugins/hoster/RapidshareCom.py
@@ -113,12 +113,8 @@ class RapidshareCom(Hoster):
if src.startswith("ERROR"):
return
fields = src.split(",")
- self.api_data = {}
- self.api_data["fileid"] = fields[0]
- self.api_data["filename"] = fields[1]
- self.api_data["size"] = int(fields[2]) # in bytes
- self.api_data["serverid"] = fields[3]
- self.api_data["status"] = fields[4]
+ self.api_data = {"fileid": fields[0], "filename": fields[1], "size": int(fields[2]), "serverid": fields[3],
+ "status": fields[4]}
"""
status codes:
0=File not found
@@ -155,7 +151,7 @@ class RapidshareCom(Hoster):
self.wantReconnect = True
return 60 * int(wait_minutes) + 60
except:
- if re.search(r"(Currently a lot of users|no more download slots|servers are overloaded)", self.html[1], re.I) != None:
+ if re.search(r"(Currently a lot of users|no more download slots|servers are overloaded)", self.html[1], re.I) is not None:
self.log.info(_("Rapidshare: No free slots!"))
self.no_slots = True
return time() + 130
diff --git a/module/plugins/hoster/RedtubeCom.py b/module/plugins/hoster/RedtubeCom.py
index 6a9baffbe..748ab04f0 100644
--- a/module/plugins/hoster/RedtubeCom.py
+++ b/module/plugins/hoster/RedtubeCom.py
@@ -29,7 +29,7 @@ class RedtubeCom(Hoster):
def get_file_url(self):
""" returns the absolute downloadable filepath
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
file_url = unescape(re.search(r'hashlink=(http.*?)"', self.html).group(1))
@@ -37,7 +37,7 @@ class RedtubeCom(Hoster):
return file_url
def get_file_name(self):
- if self.html == None:
+ if self.html is None:
self.download_html()
name = re.search('<title>(.*?)- RedTube - Free Porn Videos</title>', self.html).group(1).strip() + ".flv"
@@ -46,10 +46,10 @@ class RedtubeCom(Hoster):
def file_exists(self):
""" returns True or False
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
- if re.search(r'This video has been removed.', self.html) != None:
+ if re.search(r'This video has been removed.', self.html) is not None:
return False
else:
return True
diff --git a/module/plugins/hoster/ShareCx.py b/module/plugins/hoster/ShareCx.py
index e64459754..63a51eab7 100644
--- a/module/plugins/hoster/ShareCx.py
+++ b/module/plugins/hoster/ShareCx.py
@@ -62,7 +62,7 @@ class ShareCx(Hoster):
def doDownload(self):
""" returns the absolute downloadable filepath
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
op = re.search(r'name="op" value="(.*?)"', self.html).group(1)
@@ -83,7 +83,7 @@ class ShareCx(Hoster):
m = re.search(r'startTimer\((\d+)\)', self.html)
- if m != None:
+ if m is not None:
wait_time = int(m.group(1))
self.setWait(wait_time)
self.wantReconnect = True
@@ -91,9 +91,9 @@ class ShareCx(Hoster):
self.wait()
m = re.search(r'countdown">.*?(\d+).*?</span>', self.html)
- if m == None:
+ if m is None:
m = re.search(r'id="countdown_str".*?<span id=".*?">.*?(\d+).*?</span', self.html)
- if m != None:
+ if m is not None:
wait_time = int(m.group(1))
self.setWait(wait_time)
self.wantReconnect = False
@@ -120,7 +120,7 @@ class ShareCx(Hoster):
}
if '/captchas/' in self.html:
- captcha_url = re.search(r'(http://(?:[\w\d]+\.)?.*?/captchas/.*?)').group(1)
+ captcha_url = re.search(r'(http://(?:[\w\d]+\.)?.*?/captchas/.*?)', self.html).group(1)
captcha = self.decryptCaptcha(captcha_url)
data["code"] = captcha
@@ -135,7 +135,7 @@ class ShareCx(Hoster):
# postfields["method_free"] = "Datei herunterladen"
def get_file_name(self):
- if self.html == None:
+ if self.html is None:
self.download_html()
name = re.search(r'alt="Download" /></span>(.*?)</h3>', self.html).group(1)
@@ -144,10 +144,10 @@ class ShareCx(Hoster):
def file_exists(self):
""" returns True or False
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
- if re.search(r'File not found<br>It was deleted due to inactivity or abuse request', self.html) != None:
+ if re.search(r'File not found<br>It was deleted due to inactivity or abuse request', self.html) is not None:
return False
return True
diff --git a/module/plugins/hoster/ShragleCom.py b/module/plugins/hoster/ShragleCom.py
index e634607b0..65d2787f0 100644
--- a/module/plugins/hoster/ShragleCom.py
+++ b/module/plugins/hoster/ShragleCom.py
@@ -24,7 +24,7 @@ class ShragleCom(Hoster):
def set_parent_status(self):
""" sets all available Statusinfos about a File in self.parent.status
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
self.parent.status.filename = self.get_file_name()
self.parent.status.url = self.get_file_url()
@@ -38,7 +38,7 @@ class ShragleCom(Hoster):
def get_file_url(self):
""" returns the absolute downloadable filepath
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
self.fileID = re.search(r"name=\"fileID\" value=\"([^\"]+)", self.html).group(1)
@@ -49,7 +49,7 @@ class ShragleCom(Hoster):
return "http://srv4.shragle.com/download.php"
def get_file_name(self):
- if self.html == None:
+ if self.html is None:
self.download_html()
file_name_pattern = r"<\/div><h2>(.+)<\/h2"
@@ -58,10 +58,10 @@ class ShragleCom(Hoster):
def file_exists(self):
""" returns True or False
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
- if re.search(r"html", self.html) == None:
+ if re.search(r"html", self.html) is None:
return False
else:
return True
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py
index a2165bd5e..b0c3486e3 100644
--- a/module/plugins/hoster/UploadedTo.py
+++ b/module/plugins/hoster/UploadedTo.py
@@ -137,7 +137,7 @@ class UploadedTo(Hoster):
return self.pyfile.url.split('/')[-1]
def file_exists(self):
- if re.search(r"(File doesn't exist)", self.html) != None:
+ if re.search(r"(File doesn't exist)", self.html) is not None:
return False
else:
return True
diff --git a/module/plugins/hoster/YoupornCom.py b/module/plugins/hoster/YoupornCom.py
index 5c07f2c84..fb9ef5a02 100644
--- a/module/plugins/hoster/YoupornCom.py
+++ b/module/plugins/hoster/YoupornCom.py
@@ -23,7 +23,7 @@ class YoupornCom(Hoster):
def set_parent_status(self):
""" sets all available Statusinfos about a File in self.parent.status
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
self.parent.status.filename = self.get_file_name()
self.parent.status.url = self.get_file_url()
@@ -36,14 +36,14 @@ class YoupornCom(Hoster):
def get_file_url(self):
""" returns the absolute downloadable filepath
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
file_url = re.search(r'(http://download.youporn.com/download/\d*/.*\?download=1&ll=1&t=dd)">', self.html).group(1)
return file_url
def get_file_name(self):
- if self.html == None:
+ if self.html is None:
self.download_html()
file_name_pattern = r".*<title>(.*) - Free Porn Videos - YouPorn.com Lite \(BETA\)</title>.*"
@@ -52,9 +52,9 @@ class YoupornCom(Hoster):
def file_exists(self):
""" returns True or False
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
- if re.search(r"(.*invalid video_id.*)", self.html) != None:
+ if re.search(r"(.*invalid video_id.*)", self.html) is not None:
return False
else:
return True
diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py
index 79c359ad7..6b69c3fd4 100644
--- a/module/plugins/hoster/YoutubeCom.py
+++ b/module/plugins/hoster/YoutubeCom.py
@@ -17,7 +17,7 @@ class YoutubeCom(Hoster):
def process(self, pyfile):
html = self.load(pyfile.url)
- if re.search(r"(.*eine fehlerhafte Video-ID\.)", html) != None:
+ if re.search(r"(.*eine fehlerhafte Video-ID\.)", html) is not None:
self.offline()
videoId = pyfile.url.split("v=")[1].split("&")[0]
diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py
index 3740f8c14..d42ce3578 100644
--- a/module/plugins/hoster/ZippyshareCom.py
+++ b/module/plugins/hoster/ZippyshareCom.py
@@ -41,7 +41,7 @@ class ZippyshareCom(Hoster):
return file_url
def get_file_name(self):
- if self.html == None:
+ if self.html is None:
self.download_html()
if not self.wantReconnect:
file_name = re.search(r'Name: </font> <font.*>(.*?)</font>', self.html).group(1)
@@ -52,9 +52,9 @@ class ZippyshareCom(Hoster):
def file_exists(self):
""" returns True or False
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
- if re.search(r'File does not exist on this server', self.html) != None:
+ if re.search(r'File does not exist on this server', self.html) is not None:
return False
else:
return True