summaryrefslogtreecommitdiffstats
path: root/pyload/plugin/hook/DeathByCaptcha.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-01 13:05:40 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-01 13:05:40 +0200
commit095ad393330d9ccb86adac4894fe3280caa44234 (patch)
treef03b4a5674b4f6e79706350e06543ba565effd85 /pyload/plugin/hook/DeathByCaptcha.py
parentUse bitmath lib to formatSize (diff)
parentFix https://github.com/pyload/pyload/issues/1351 (diff)
downloadpyload-095ad393330d9ccb86adac4894fe3280caa44234.tar.xz
Merge branch 'stable' into 0.4.10
Conflicts: module/plugins/hoster/RehostTo.py module/plugins/hoster/XVideosCom.py module/plugins/hoster/ZeveraCom.py module/plugins/internal/CaptchaService.py pyload/plugin/account/FilefactoryCom.py pyload/plugin/account/OneFichierCom.py pyload/plugin/account/WebshareCz.py pyload/plugin/addon/AntiVirus.py pyload/plugin/addon/Checksum.py pyload/plugin/addon/ExtractArchive.py pyload/plugin/container/CCF.py pyload/plugin/crypter/Go4UpCom.py pyload/plugin/hook/BypassCaptcha.py pyload/plugin/hook/CaptchaBrotherhood.py pyload/plugin/hook/ExpertDecoders.py pyload/plugin/hook/ImageTyperz.py pyload/plugin/hook/XFileSharingPro.py pyload/plugin/hoster/Ftp.py pyload/plugin/hoster/GigapetaCom.py pyload/plugin/hoster/MegaRapidCz.py pyload/plugin/hoster/MegaRapidoNet.py pyload/plugin/hoster/MultishareCz.py pyload/plugin/hoster/NarodRu.py pyload/plugin/hoster/QuickshareCz.py pyload/plugin/hoster/RapidgatorNet.py pyload/plugin/hoster/RapiduNet.py pyload/plugin/hoster/UnibytesCom.py pyload/plugin/hoster/UploadingCom.py pyload/plugin/hoster/WrzucTo.py pyload/plugin/internal/BasePlugin.py pyload/plugin/internal/SimpleDereferer.py pyload/plugin/internal/SimpleHoster.py pyload/plugin/internal/XFSCrypter.py pyload/plugin/internal/XFSHoster.py
Diffstat (limited to 'pyload/plugin/hook/DeathByCaptcha.py')
-rw-r--r--pyload/plugin/hook/DeathByCaptcha.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pyload/plugin/hook/DeathByCaptcha.py b/pyload/plugin/hook/DeathByCaptcha.py
index 71d1ddb0a..670807bf5 100644
--- a/pyload/plugin/hook/DeathByCaptcha.py
+++ b/pyload/plugin/hook/DeathByCaptcha.py
@@ -2,11 +2,11 @@
from __future__ import with_statement
+import pycurl
import re
import time
from base64 import b64encode
-from pycurl import FORM_FILE, HTTPHEADER
from pyload.utils import json_loads
from pyload.network.HTTPRequest import BadHeader
@@ -73,7 +73,7 @@ class DeathByCaptcha(Hook):
def api_response(self, api="captcha", post=False, multipart=False):
req = getRequest()
- req.c.setopt(HTTPHEADER, ["Accept: application/json", "User-Agent: pyLoad %s" % self.core.version])
+ req.c.setopt(pycurl.HTTPHEADER, ["Accept: application/json", "User-Agent: pyLoad %s" % self.core.version])
if post:
if not isinstance(post, dict):
@@ -134,7 +134,7 @@ class DeathByCaptcha(Hook):
#@NOTE: Workaround multipart-post bug in HTTPRequest.py
if re.match("^\w*$", self.getConfig('passkey')):
multipart = True
- data = (FORM_FILE, captcha)
+ data = (pycurl.FORM_FILE, captcha)
else:
multipart = False
with open(captcha, 'rb') as f: