summaryrefslogtreecommitdiffstats
path: root/pyload/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugin')
-rw-r--r--pyload/plugin/Captcha.py2
-rw-r--r--pyload/plugin/Crypter.py4
-rw-r--r--pyload/plugin/account/DropboxCom.py2
-rw-r--r--pyload/plugin/account/EasybytezCom.py2
-rw-r--r--pyload/plugin/account/TusfilesNet.py1
-rw-r--r--pyload/plugin/captcha/AdsCaptcha.py5
-rw-r--r--pyload/plugin/captcha/ReCaptcha.py10
-rw-r--r--pyload/plugin/crypter/CloudzillaTo.py1
-rw-r--r--pyload/plugin/crypter/DataHu.py2
-rw-r--r--pyload/plugin/crypter/FilerNet.py2
-rw-r--r--pyload/plugin/hoster/AlldebridCom.py3
-rw-r--r--pyload/plugin/hoster/DataHu.py2
-rw-r--r--pyload/plugin/hoster/DevhostSt.py2
-rw-r--r--pyload/plugin/hoster/FastixRu.py3
-rw-r--r--pyload/plugin/hoster/GooIm.py2
-rw-r--r--pyload/plugin/hoster/HellshareCz.py2
-rw-r--r--pyload/plugin/hoster/MegaDebridEu.py3
-rw-r--r--pyload/plugin/hoster/MultishareCz.py1
-rw-r--r--pyload/plugin/hoster/MyfastfileCom.py2
-rw-r--r--pyload/plugin/hoster/OneFichierCom.py2
-rw-r--r--pyload/plugin/hoster/OverLoadMe.py3
-rw-r--r--pyload/plugin/hoster/RPNetBiz.py2
-rw-r--r--pyload/plugin/hoster/RapiduNet.py1
-rw-r--r--pyload/plugin/hoster/RarefileNet.py2
-rw-r--r--pyload/plugin/hoster/RealdebridCom.py2
-rw-r--r--pyload/plugin/hoster/RehostTo.py2
-rw-r--r--pyload/plugin/hoster/RgHostNet.py2
-rw-r--r--pyload/plugin/hoster/SimplydebridCom.py2
-rw-r--r--pyload/plugin/hoster/SpeedyshareCom.py1
-rw-r--r--pyload/plugin/hoster/StreamcloudEu.py2
-rw-r--r--pyload/plugin/hoster/TwoSharedCom.py2
-rw-r--r--pyload/plugin/hoster/UnrestrictLi.py2
-rw-r--r--pyload/plugin/hoster/XVideosCom.py5
-rw-r--r--pyload/plugin/hoster/XdadevelopersCom.py2
-rw-r--r--pyload/plugin/hoster/YourfilesTo.py3
-rw-r--r--pyload/plugin/hoster/YoutubeCom.py3
-rw-r--r--pyload/plugin/hoster/ZeveraCom.py4
-rw-r--r--pyload/plugin/internal/XFSHoster.py1
38 files changed, 16 insertions, 78 deletions
diff --git a/pyload/plugin/Captcha.py b/pyload/plugin/Captcha.py
index d7a506979..3bf64eb19 100644
--- a/pyload/plugin/Captcha.py
+++ b/pyload/plugin/Captcha.py
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
-import re
-
from pyload.plugin.Plugin import Base
diff --git a/pyload/plugin/Crypter.py b/pyload/plugin/Crypter.py
index 3c1413f09..22afe74d8 100644
--- a/pyload/plugin/Crypter.py
+++ b/pyload/plugin/Crypter.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from urlparse import urlparse
+import urlparse
from pyload.plugin.Plugin import Plugin
from pyload.utils import decode, safe_filename
@@ -98,7 +98,7 @@ class Crypter(Plugin):
elif not folder_per_package or name != folder:
if not folder:
- folder = urlparse(name).path.split("/")[-1]
+ folder = urlparse.urlparse(name).path.split("/")[-1]
setFolder(safe_filename(folder))
self.logDebug("Set package %(name)s folder to: %(folder)s" % {"name": name, "folder": folder})
diff --git a/pyload/plugin/account/DropboxCom.py b/pyload/plugin/account/DropboxCom.py
index 80dfd6cea..055c28195 100644
--- a/pyload/plugin/account/DropboxCom.py
+++ b/pyload/plugin/account/DropboxCom.py
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
-import re
-
from pyload.plugin.internal.SimpleHoster import SimpleHoster
diff --git a/pyload/plugin/account/EasybytezCom.py b/pyload/plugin/account/EasybytezCom.py
index c1f641669..6419369e8 100644
--- a/pyload/plugin/account/EasybytezCom.py
+++ b/pyload/plugin/account/EasybytezCom.py
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
-import re
-
from pyload.plugin.internal.XFSAccount import XFSAccount
diff --git a/pyload/plugin/account/TusfilesNet.py b/pyload/plugin/account/TusfilesNet.py
index b18d49748..f651fa0e1 100644
--- a/pyload/plugin/account/TusfilesNet.py
+++ b/pyload/plugin/account/TusfilesNet.py
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
-import re
import time
from pyload.plugin.internal.XFSAccount import XFSAccount
diff --git a/pyload/plugin/captcha/AdsCaptcha.py b/pyload/plugin/captcha/AdsCaptcha.py
index a0ccdda58..c2caa7bf6 100644
--- a/pyload/plugin/captcha/AdsCaptcha.py
+++ b/pyload/plugin/captcha/AdsCaptcha.py
@@ -1,9 +1,8 @@
# -*- coding: utf-8 -*-
+import random
import re
-from random import random
-
from pyload.plugin.Captcha import Captcha
@@ -71,7 +70,7 @@ class AdsCaptcha(Captcha):
def result(self, server, challenge):
result = self.plugin.decryptCaptcha("%sChallenge.aspx" % server,
- get={'cid': challenge, 'dummy': random()},
+ get={'cid': challenge, 'dummy': random.random()},
cookies=True,
imgtype="jpg")
diff --git a/pyload/plugin/captcha/ReCaptcha.py b/pyload/plugin/captcha/ReCaptcha.py
index 9c75c2212..dc431f2ea 100644
--- a/pyload/plugin/captcha/ReCaptcha.py
+++ b/pyload/plugin/captcha/ReCaptcha.py
@@ -1,11 +1,11 @@
# -*- coding: utf-8 -*-
+import random
import re
import time
+import urlparse
from base64 import b64encode
-from random import randint
-from urlparse import urljoin, urlparse
from pyload.plugin.Captcha import Captcha
@@ -122,7 +122,7 @@ class ReCaptcha(Captcha):
self.logDebug("Time: %s" % millis)
- rand = randint(1, 99999999)
+ rand = random.randint(1, 99999999)
a = "0.%s" % str(rand * 2147483647)
rpc = int(100000000 * float(a))
@@ -134,7 +134,7 @@ class ReCaptcha(Captcha):
def _challenge_v2(self, key, parent=None):
if parent is None:
try:
- parent = urljoin("http://", urlparse(self.plugin.pyfile.url).netloc)
+ parent = urlparse.urljoin("http://", urlparse.urlparse(self.plugin.pyfile.url).netloc)
except Exception:
parent = ""
@@ -181,7 +181,7 @@ class ReCaptcha(Captcha):
self.logDebug("Result: %s" % response)
timeToSolve = int(round(time.time() * 1000)) - millis_captcha_loading
- timeToSolveMore = timeToSolve + int(float("0." + str(randint(1, 99999999))) * 500)
+ timeToSolveMore = timeToSolve + int(float("0." + str(random.randint(1, 99999999))) * 500)
html = self.plugin.req.load("https://www.google.com/recaptcha/api2/userverify",
post={'k' : key,
diff --git a/pyload/plugin/crypter/CloudzillaTo.py b/pyload/plugin/crypter/CloudzillaTo.py
index 7042f7750..a12b2736c 100644
--- a/pyload/plugin/crypter/CloudzillaTo.py
+++ b/pyload/plugin/crypter/CloudzillaTo.py
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
import re
-import urlparse
from pyload.plugin.internal.SimpleCrypter import SimpleCrypter
diff --git a/pyload/plugin/crypter/DataHu.py b/pyload/plugin/crypter/DataHu.py
index ce480dacb..a6c219d29 100644
--- a/pyload/plugin/crypter/DataHu.py
+++ b/pyload/plugin/crypter/DataHu.py
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
-import re
-
from pyload.plugin.internal.SimpleCrypter import SimpleCrypter
diff --git a/pyload/plugin/crypter/FilerNet.py b/pyload/plugin/crypter/FilerNet.py
index 6ff4c279c..a57f2908a 100644
--- a/pyload/plugin/crypter/FilerNet.py
+++ b/pyload/plugin/crypter/FilerNet.py
@@ -1,4 +1,4 @@
-import re
+# -*- coding: utf-8 -*-
from pyload.plugin.internal.SimpleCrypter import SimpleCrypter
diff --git a/pyload/plugin/hoster/AlldebridCom.py b/pyload/plugin/hoster/AlldebridCom.py
index 7474e62e8..9f7497e72 100644
--- a/pyload/plugin/hoster/AlldebridCom.py
+++ b/pyload/plugin/hoster/AlldebridCom.py
@@ -1,8 +1,5 @@
# -*- coding: utf-8 -*-
-import re
-import urllib
-
from pyload.utils import json_loads
from pyload.plugin.internal.MultiHoster import MultiHoster
from pyload.utils import parseFileSize
diff --git a/pyload/plugin/hoster/DataHu.py b/pyload/plugin/hoster/DataHu.py
index ba3576d10..16b3c2737 100644
--- a/pyload/plugin/hoster/DataHu.py
+++ b/pyload/plugin/hoster/DataHu.py
@@ -3,8 +3,6 @@
# Test links:
# http://data.hu/get/6381232/random.bin
-import re
-
from pyload.plugin.internal.SimpleHoster import SimpleHoster
diff --git a/pyload/plugin/hoster/DevhostSt.py b/pyload/plugin/hoster/DevhostSt.py
index 573b92838..f35530523 100644
--- a/pyload/plugin/hoster/DevhostSt.py
+++ b/pyload/plugin/hoster/DevhostSt.py
@@ -3,8 +3,6 @@
# Test links:
# http://d-h.st/mM8
-import re
-
from pyload.plugin.internal.SimpleHoster import SimpleHoster
diff --git a/pyload/plugin/hoster/FastixRu.py b/pyload/plugin/hoster/FastixRu.py
index dc3b7d6ea..eee4da08c 100644
--- a/pyload/plugin/hoster/FastixRu.py
+++ b/pyload/plugin/hoster/FastixRu.py
@@ -1,8 +1,5 @@
# -*- coding: utf-8 -*-
-import re
-import urllib
-
from pyload.utils import json_loads
from pyload.plugin.internal.MultiHoster import MultiHoster
diff --git a/pyload/plugin/hoster/GooIm.py b/pyload/plugin/hoster/GooIm.py
index 322dd6101..6fc4a1fce 100644
--- a/pyload/plugin/hoster/GooIm.py
+++ b/pyload/plugin/hoster/GooIm.py
@@ -3,8 +3,6 @@
# Test links:
# https://goo.im/devs/liquidsmooth/3.x/codina/Nightly/LS-KK-v3.2-2014-08-01-codina.zip
-import re
-
from pyload.plugin.internal.SimpleHoster import SimpleHoster
diff --git a/pyload/plugin/hoster/HellshareCz.py b/pyload/plugin/hoster/HellshareCz.py
index 735ed1f19..0e909c599 100644
--- a/pyload/plugin/hoster/HellshareCz.py
+++ b/pyload/plugin/hoster/HellshareCz.py
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
-import urlparse
-
from pyload.plugin.internal.SimpleHoster import SimpleHoster
diff --git a/pyload/plugin/hoster/MegaDebridEu.py b/pyload/plugin/hoster/MegaDebridEu.py
index 4b2604046..fd578a83c 100644
--- a/pyload/plugin/hoster/MegaDebridEu.py
+++ b/pyload/plugin/hoster/MegaDebridEu.py
@@ -1,8 +1,5 @@
# -*- coding: utf-8 -*-
-import re
-import urllib
-
from pyload.utils import json_loads
from pyload.plugin.internal.MultiHoster import MultiHoster
diff --git a/pyload/plugin/hoster/MultishareCz.py b/pyload/plugin/hoster/MultishareCz.py
index d4546e5f9..b19dfba38 100644
--- a/pyload/plugin/hoster/MultishareCz.py
+++ b/pyload/plugin/hoster/MultishareCz.py
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
import random
-import re
from pyload.plugin.internal.SimpleHoster import SimpleHoster
diff --git a/pyload/plugin/hoster/MyfastfileCom.py b/pyload/plugin/hoster/MyfastfileCom.py
index 57041d6cd..12418670a 100644
--- a/pyload/plugin/hoster/MyfastfileCom.py
+++ b/pyload/plugin/hoster/MyfastfileCom.py
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
-import re
-
from pyload.utils import json_loads
from pyload.plugin.internal.MultiHoster import MultiHoster
diff --git a/pyload/plugin/hoster/OneFichierCom.py b/pyload/plugin/hoster/OneFichierCom.py
index 74ac71fcb..b33a9e820 100644
--- a/pyload/plugin/hoster/OneFichierCom.py
+++ b/pyload/plugin/hoster/OneFichierCom.py
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
-import re
-
from pyload.plugin.internal.SimpleHoster import SimpleHoster
diff --git a/pyload/plugin/hoster/OverLoadMe.py b/pyload/plugin/hoster/OverLoadMe.py
index 85a0f0a1f..c9ee5e653 100644
--- a/pyload/plugin/hoster/OverLoadMe.py
+++ b/pyload/plugin/hoster/OverLoadMe.py
@@ -1,8 +1,5 @@
# -*- coding: utf-8 -*-
-import re
-import urllib
-
from pyload.utils import json_loads
from pyload.plugin.internal.MultiHoster import MultiHoster
from pyload.utils import parseFileSize
diff --git a/pyload/plugin/hoster/RPNetBiz.py b/pyload/plugin/hoster/RPNetBiz.py
index dc11eefb2..b84f171c3 100644
--- a/pyload/plugin/hoster/RPNetBiz.py
+++ b/pyload/plugin/hoster/RPNetBiz.py
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
-import re
-
from pyload.plugin.internal.MultiHoster import MultiHoster
from pyload.utils import json_loads
diff --git a/pyload/plugin/hoster/RapiduNet.py b/pyload/plugin/hoster/RapiduNet.py
index 6bbfc171a..81d25a3fa 100644
--- a/pyload/plugin/hoster/RapiduNet.py
+++ b/pyload/plugin/hoster/RapiduNet.py
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
import pycurl
-import re
import time
from pyload.utils import json_loads
diff --git a/pyload/plugin/hoster/RarefileNet.py b/pyload/plugin/hoster/RarefileNet.py
index f89708282..2c853c6ba 100644
--- a/pyload/plugin/hoster/RarefileNet.py
+++ b/pyload/plugin/hoster/RarefileNet.py
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
-import re
-
from pyload.plugin.internal.XFSHoster import XFSHoster
diff --git a/pyload/plugin/hoster/RealdebridCom.py b/pyload/plugin/hoster/RealdebridCom.py
index e9c55fae3..642de3f92 100644
--- a/pyload/plugin/hoster/RealdebridCom.py
+++ b/pyload/plugin/hoster/RealdebridCom.py
@@ -1,8 +1,6 @@
# -*- coding: utf-8 -*-
-import re
import time
-import urllib
from pyload.utils import json_loads
from pyload.plugin.internal.MultiHoster import MultiHoster
diff --git a/pyload/plugin/hoster/RehostTo.py b/pyload/plugin/hoster/RehostTo.py
index c707a866f..f6f5630fb 100644
--- a/pyload/plugin/hoster/RehostTo.py
+++ b/pyload/plugin/hoster/RehostTo.py
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
-from urllib import unquote
-
from pyload.plugin.internal.MultiHoster import MultiHoster
diff --git a/pyload/plugin/hoster/RgHostNet.py b/pyload/plugin/hoster/RgHostNet.py
index 14c92f9ab..04ecbda8f 100644
--- a/pyload/plugin/hoster/RgHostNet.py
+++ b/pyload/plugin/hoster/RgHostNet.py
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
-import re
-
from pyload.plugin.internal.SimpleHoster import SimpleHoster
diff --git a/pyload/plugin/hoster/SimplydebridCom.py b/pyload/plugin/hoster/SimplydebridCom.py
index d703c3e52..fb7beb3fb 100644
--- a/pyload/plugin/hoster/SimplydebridCom.py
+++ b/pyload/plugin/hoster/SimplydebridCom.py
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
-import re
-
from pyload.plugin.internal.MultiHoster import MultiHoster, replace_patterns
diff --git a/pyload/plugin/hoster/SpeedyshareCom.py b/pyload/plugin/hoster/SpeedyshareCom.py
index 5133725fd..27b866f70 100644
--- a/pyload/plugin/hoster/SpeedyshareCom.py
+++ b/pyload/plugin/hoster/SpeedyshareCom.py
@@ -4,7 +4,6 @@
# http://speedy.sh/ep2qY/Zapp-Brannigan.jpg
import re
-import urlparse
from pyload.plugin.internal.SimpleHoster import SimpleHoster
diff --git a/pyload/plugin/hoster/StreamcloudEu.py b/pyload/plugin/hoster/StreamcloudEu.py
index cdf244539..da759ae3b 100644
--- a/pyload/plugin/hoster/StreamcloudEu.py
+++ b/pyload/plugin/hoster/StreamcloudEu.py
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
-import re
-
from pyload.plugin.internal.XFSHoster import XFSHoster
diff --git a/pyload/plugin/hoster/TwoSharedCom.py b/pyload/plugin/hoster/TwoSharedCom.py
index f116abfc1..988c50620 100644
--- a/pyload/plugin/hoster/TwoSharedCom.py
+++ b/pyload/plugin/hoster/TwoSharedCom.py
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
-import re
-
from pyload.plugin.internal.SimpleHoster import SimpleHoster
diff --git a/pyload/plugin/hoster/UnrestrictLi.py b/pyload/plugin/hoster/UnrestrictLi.py
index 4f719eae4..b0230a7b4 100644
--- a/pyload/plugin/hoster/UnrestrictLi.py
+++ b/pyload/plugin/hoster/UnrestrictLi.py
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
-import re
-
from pyload.utils import json_loads
from pyload.plugin.internal.MultiHoster import MultiHoster
from pyload.plugin.internal.SimpleHoster import secondsToMidnight
diff --git a/pyload/plugin/hoster/XVideosCom.py b/pyload/plugin/hoster/XVideosCom.py
index ae4d0637f..be168fbb9 100644
--- a/pyload/plugin/hoster/XVideosCom.py
+++ b/pyload/plugin/hoster/XVideosCom.py
@@ -1,8 +1,7 @@
# -*- coding: utf-8 -*-
import re
-
-from urllib import unquote
+import urllib
from pyload.plugin.Hoster import Hoster
@@ -25,4 +24,4 @@ class XVideosCom(Hoster):
re.search(r"<h2>([^<]+)<span", site).group(1),
re.match(self.__pattern, pyfile.url).group(1),
)
- self.download(unquote(re.search(r"flv_url=([^&]+)&", site).group(1)))
+ self.download(urllib.unquote(re.search(r"flv_url=([^&]+)&", site).group(1)))
diff --git a/pyload/plugin/hoster/XdadevelopersCom.py b/pyload/plugin/hoster/XdadevelopersCom.py
index 0fe9197aa..9183563b7 100644
--- a/pyload/plugin/hoster/XdadevelopersCom.py
+++ b/pyload/plugin/hoster/XdadevelopersCom.py
@@ -3,8 +3,6 @@
# Test links:
# http://forum.xda-developers.com/devdb/project/dl/?id=10885
-import re
-
from pyload.plugin.internal.SimpleHoster import SimpleHoster
diff --git a/pyload/plugin/hoster/YourfilesTo.py b/pyload/plugin/hoster/YourfilesTo.py
index 4ac49d357..62b66d668 100644
--- a/pyload/plugin/hoster/YourfilesTo.py
+++ b/pyload/plugin/hoster/YourfilesTo.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
-import reimport urllib
+import re
+import urllib
from pyload.plugin.Hoster import Hoster
diff --git a/pyload/plugin/hoster/YoutubeCom.py b/pyload/plugin/hoster/YoutubeCom.py
index b6f91fdb0..4998efbec 100644
--- a/pyload/plugin/hoster/YoutubeCom.py
+++ b/pyload/plugin/hoster/YoutubeCom.py
@@ -2,7 +2,8 @@
import os
import re
-import subprocessimport urllib
+import subprocess
+import urllib
from pyload.plugin.Hoster import Hoster
from pyload.plugin.internal.SimpleHoster import replace_patterns
diff --git a/pyload/plugin/hoster/ZeveraCom.py b/pyload/plugin/hoster/ZeveraCom.py
index c5defeff7..005c32cf8 100644
--- a/pyload/plugin/hoster/ZeveraCom.py
+++ b/pyload/plugin/hoster/ZeveraCom.py
@@ -1,9 +1,5 @@
# -*- coding: utf-8 -*-
-import re
-
-from urlparse import urljoin
-
from pyload.plugin.internal.MultiHoster import MultiHoster
diff --git a/pyload/plugin/internal/XFSHoster.py b/pyload/plugin/internal/XFSHoster.py
index ca0dca045..06d91f4d6 100644
--- a/pyload/plugin/internal/XFSHoster.py
+++ b/pyload/plugin/internal/XFSHoster.py
@@ -3,7 +3,6 @@
import pycurl
import random
import re
-import urlparse
from pyload.plugin.captcha.ReCaptcha import ReCaptcha
from pyload.plugin.captcha.SolveMedia import SolveMedia
from pyload.plugin.internal.SimpleHoster import SimpleHoster, secondsToMidnight