prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  DepositfilesCom Parse error
  Hi,
  
  debuglog http://pastebin.com/v0SGFL9R
  
  handleFree_line44.dump.html  http://pastebin.com/2V3Rjn7M
  handleFree_line60.dump.html  http://pastebin.com/mxPsFQgk
  preload_line455.dump.html      http://pastebin.com/F9vBdCct
  
  TIA
  
  
  </issue>
  <code>
  [start of module/plugins/hoster/DepositfilesCom.py]
  1 # -*- coding: utf-8 -*-
  2 
  3 import re
  4 
  5 from urllib import unquote
  6 
  7 from module.plugins.internal.CaptchaService import ReCaptcha
  8 from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
  9 
  10 
  11 class DepositfilesCom(SimpleHoster):
  12     __name__    = "DepositfilesCom"
  13     __type__    = "hoster"
  14     __version__ = "0.54"
  15 
  16     __pattern__ = r'https?://(?:www\.)?(depositfiles\.com|dfiles\.(eu|ru))(/\w{1,3})?/files/(?P<ID>\w+)'
  17     __config__  = [("use_premium", "bool", "Use premium account if available", True)]
  18 
  19     __description__ = """Depositfiles.com hoster plugin"""
  20     __license__     = "GPLv3"
  21     __authors__     = [("spoob", "spoob@pyload.org"),
  22                        ("zoidberg", "zoidberg@mujmail.cz"),
  23                        ("Walter Purcaro", "vuolter@gmail.com")]
  24 
  25 
  26     NAME_PATTERN    = r'<script type="text/javascript">eval\( unescape\(\'(?P<N>.*?)\''
  27     SIZE_PATTERN    = r': <b>(?P<S>[\d.,]+)&nbsp;(?P<U>[\w^_]+)</b>'
  28     OFFLINE_PATTERN = r'<span class="html_download_api-not_exists"></span>'
  29 
  30     NAME_REPLACEMENTS = [(r'\%u([0-9A-Fa-f]{4})', lambda m: unichr(int(m.group(1), 16))),
  31                               (r'.*<b title="(?P<N>.+?)".*', "\g<N>")]
  32     URL_REPLACEMENTS  = [(__pattern__ + ".*", "https://dfiles.eu/files/\g<ID>")]
  33 
  34     COOKIES = [("dfiles.eu", "lang_current", "en")]
  35 
  36     WAIT_PATTERN = r'(?:download_waiter_remain">|html_download_api-limit_interval">|>Please wait|>Try in).+'
  37     ERROR_PATTER = r'File is checked, please try again in a minute'
  38 
  39     LINK_FREE_PATTERN    = r'<form id="downloader_file_form" action="(http://.+?\.(dfiles\.eu|depositfiles\.com)/.+?)" method="post"'
  40     LINK_PREMIUM_PATTERN = r'class="repeat"><a href="(.+?)"'
  41     LINK_MIRROR_PATTERN  = r'class="repeat_mirror"><a href="(.+?)"'
  42 
  43 
  44     def handleFree(self, pyfile):
  45         self.html = self.load(pyfile.url, post={'gateway_result': "1"})
  46 
  47         self.checkErrors()
  48 
  49         m = re.search(r"var fid = '(\w+)';", self.html)
  50         if m is None:
  51             self.retry(wait_time=5)
  52         params = {'fid': m.group(1)}
  53         self.logDebug("FID: %s" % params['fid'])
  54 
  55         self.wait()
  56         recaptcha = ReCaptcha(self)
  57         captcha_key = recaptcha.detect_key()
  58         if captcha_key is None:
  59             return
  60 
  61         self.html = self.load("https://dfiles.eu/get_file.php", get=params)
  62 
  63         if '<input type=button value="Continue" onclick="check_recaptcha' in self.html:
  64             params['response'], params['challenge'] = recaptcha.challenge(captcha_key)
  65             self.html = self.load("https://dfiles.eu/get_file.php", get=params)
  66 
  67         m = re.search(self.LINK_FREE_PATTERN, self.html)
  68         if m:
  69             if 'response' in params:
  70                 self.correctCaptcha()
  71 
  72             self.link = unquote(m.group(1))
  73 
  74 
  75     def handlePremium(self, pyfile):
  76         if '<span class="html_download_api-gold_traffic_limit">' in self.html:
  77             self.logWarning(_("Download limit reached"))
  78             self.retry(25, 60 * 60, "Download limit reached")
  79 
  80         elif 'onClick="show_gold_offer' in self.html:
  81             self.account.relogin(self.user)
  82             self.retry()
  83 
  84         else:
  85             link   = re.search(self.LINK_PREMIUM_PATTERN, self.html)
  86             mirror = re.search(self.LINK_MIRROR_PATTERN, self.html)
  87 
  88             if link:
  89                 self.link = link.group(1)
  90 
  91             elif mirror:
  92                 self.link = mirror.group(1)
  93 
  94 
  95 getInfo = create_getInfo(DepositfilesCom)
  96
  [end of module/plugins/hoster/DepositfilesCom.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py
  --- a/module/plugins/hoster/DepositfilesCom.py
  +++ b/module/plugins/hoster/DepositfilesCom.py
  @@ -52,7 +52,9 @@
           params = {'fid': m.group(1)}
           self.logDebug("FID: %s" % params['fid'])
   
  +        self.setWait(60)
           self.wait()
  +
           recaptcha = ReCaptcha(self)
           captcha_key = recaptcha.detect_key()
           if captcha_key is None:
  
verification_info: {"golden_diff": "diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py\n--- a/module/plugins/hoster/DepositfilesCom.py\n+++ b/module/plugins/hoster/DepositfilesCom.py\n@@ -52,7 +52,9 @@\n         params = {'fid': m.group(1)}\n         self.logDebug(\"FID: %s\" % params['fid'])\n \n+        self.setWait(60)\n         self.wait()\n+\n         recaptcha = ReCaptcha(self)\n         captcha_key = recaptcha.detect_key()\n         if captcha_key is None:\n", "issue": "DepositfilesCom Parse error\nHi,\n\ndebuglog http://pastebin.com/v0SGFL9R\n\nhandleFree_line44.dump.html  http://pastebin.com/2V3Rjn7M\nhandleFree_line60.dump.html  http://pastebin.com/mxPsFQgk\npreload_line455.dump.html      http://pastebin.com/F9vBdCct\n\nTIA\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\nimport re\n\nfrom urllib import unquote\n\nfrom module.plugins.internal.CaptchaService import ReCaptcha\nfrom module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo\n\n\nclass DepositfilesCom(SimpleHoster):\n    __name__    = \"DepositfilesCom\"\n    __type__    = \"hoster\"\n    __version__ = \"0.54\"\n\n    __pattern__ = r'https?://(?:www\\.)?(depositfiles\\.com|dfiles\\.(eu|ru))(/\\w{1,3})?/files/(?P<ID>\\w+)'\n    __config__  = [(\"use_premium\", \"bool\", \"Use premium account if available\", True)]\n\n    __description__ = \"\"\"Depositfiles.com hoster plugin\"\"\"\n    __license__     = \"GPLv3\"\n    __authors__     = [(\"spoob\", \"spoob@pyload.org\"),\n                       (\"zoidberg\", \"zoidberg@mujmail.cz\"),\n                       (\"Walter Purcaro\", \"vuolter@gmail.com\")]\n\n\n    NAME_PATTERN    = r'<script type=\"text/javascript\">eval\\( unescape\\(\\'(?P<N>.*?)\\''\n    SIZE_PATTERN    = r': <b>(?P<S>[\\d.,]+)&nbsp;(?P<U>[\\w^_]+)</b>'\n    OFFLINE_PATTERN = r'<span class=\"html_download_api-not_exists\"></span>'\n\n    NAME_REPLACEMENTS = [(r'\\%u([0-9A-Fa-f]{4})', lambda m: unichr(int(m.group(1), 16))),\n                              (r'.*<b title=\"(?P<N>.+?)\".*', \"\\g<N>\")]\n    URL_REPLACEMENTS  = [(__pattern__ + \".*\", \"https://dfiles.eu/files/\\g<ID>\")]\n\n    COOKIES = [(\"dfiles.eu\", \"lang_current\", \"en\")]\n\n    WAIT_PATTERN = r'(?:download_waiter_remain\">|html_download_api-limit_interval\">|>Please wait|>Try in).+'\n    ERROR_PATTER = r'File is checked, please try again in a minute'\n\n    LINK_FREE_PATTERN    = r'<form id=\"downloader_file_form\" action=\"(http://.+?\\.(dfiles\\.eu|depositfiles\\.com)/.+?)\" method=\"post\"'\n    LINK_PREMIUM_PATTERN = r'class=\"repeat\"><a href=\"(.+?)\"'\n    LINK_MIRROR_PATTERN  = r'class=\"repeat_mirror\"><a href=\"(.+?)\"'\n\n\n    def handleFree(self, pyfile):\n        self.html = self.load(pyfile.url, post={'gateway_result': \"1\"})\n\n        self.checkErrors()\n\n        m = re.search(r\"var fid = '(\\w+)';\", self.html)\n        if m is None:\n            self.retry(wait_time=5)\n        params = {'fid': m.group(1)}\n        self.logDebug(\"FID: %s\" % params['fid'])\n\n        self.wait()\n        recaptcha = ReCaptcha(self)\n        captcha_key = recaptcha.detect_key()\n        if captcha_key is None:\n            return\n\n        self.html = self.load(\"https://dfiles.eu/get_file.php\", get=params)\n\n        if '<input type=button value=\"Continue\" onclick=\"check_recaptcha' in self.html:\n            params['response'], params['challenge'] = recaptcha.challenge(captcha_key)\n            self.html = self.load(\"https://dfiles.eu/get_file.php\", get=params)\n\n        m = re.search(self.LINK_FREE_PATTERN, self.html)\n        if m:\n            if 'response' in params:\n                self.correctCaptcha()\n\n            self.link = unquote(m.group(1))\n\n\n    def handlePremium(self, pyfile):\n        if '<span class=\"html_download_api-gold_traffic_limit\">' in self.html:\n            self.logWarning(_(\"Download limit reached\"))\n            self.retry(25, 60 * 60, \"Download limit reached\")\n\n        elif 'onClick=\"show_gold_offer' in self.html:\n            self.account.relogin(self.user)\n            self.retry()\n\n        else:\n            link   = re.search(self.LINK_PREMIUM_PATTERN, self.html)\n            mirror = re.search(self.LINK_MIRROR_PATTERN, self.html)\n\n            if link:\n                self.link = link.group(1)\n\n            elif mirror:\n                self.link = mirror.group(1)\n\n\ngetInfo = create_getInfo(DepositfilesCom)\n", "path": "module/plugins/hoster/DepositfilesCom.py"}]}