prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  uplea plugin (still) broken
  Hi again,
  
  sorry but inspite of #1369 and #1375, uplea is still not working; now it's back with downloading the HTML download page...
  24  26.04.2015 23:29:20 INFO    Download finished: *****
  23  26.04.2015 23:29:02 INFO    Download starts: ****
  
  The resulting file has correct name but is 14KB big; expected size if around 350MB
  
  
  </issue>
  <code>
  [start of module/plugins/hoster/UpleaCom.py]
  1 # -*- coding: utf-8 -*-
  2 
  3 import re
  4 
  5 from urlparse import urljoin
  6 
  7 from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
  8 
  9 
  10 class UpleaCom(XFSHoster):
  11     __name__    = "UpleaCom"
  12     __type__    = "hoster"
  13     __version__ = "0.08"
  14 
  15     __pattern__ = r'https?://(?:www\.)?uplea\.com/dl/\w{15}'
  16 
  17     __description__ = """Uplea.com hoster plugin"""
  18     __license__     = "GPLv3"
  19     __authors__     = [("Redleon", None),
  20                        ("GammaC0de", None)]
  21 
  22 
  23     NAME_PATTERN = r'class="agmd size18">(?P<N>.+?)<'
  24     SIZE_PATTERN = r'size14">(?P<S>[\d.,]+) (?P<U>[\w^_]+?)</span>'
  25     SIZE_REPLACEMENTS = [('Ko','KB'), ('Mo','MB'), ('Go','GB')]
  26 
  27     OFFLINE_PATTERN = r'>You followed an invalid or expired link'
  28     PREMIUM_PATTERN = r'You need to have a Premium subscription to download this file'
  29 
  30     LINK_PATTERN = r'"(https?://\w+\.uplea\.com/anonym/.*?)"'
  31     HOSTER_DOMAIN = "uplea.com"
  32 
  33     WAIT_PATTERN = r'timeText: ?([\d.]+),'
  34     STEP_PATTERN = r'<a href="(/step/.+)">'
  35 
  36 
  37     def setup(self):
  38         self.multiDL = False
  39         self.chunkLimit = 1
  40         self.resumeDownload = True
  41 
  42 
  43     def handleFree(self, pyfile):
  44         m = re.search(self.STEP_PATTERN, self.html)
  45         if m is None:
  46             self.error(_("STEP_PATTERN not found"))
  47 
  48         self.html = self.load(urljoin("http://uplea.com/", m.group(1)))
  49 
  50         m = re.search(self.WAIT_PATTERN, self.html)
  51         if m:
  52             self.logDebug(_("Waiting %s seconds") % m.group(1))
  53             self.wait(m.group(1), True)
  54             self.retry()
  55 
  56         m = re.search(self.PREMIUM_PATTERN, self.html)
  57         if m:
  58             self.error(_("This URL requires a premium account"))
  59 
  60         m = re.search(self.LINK_PATTERN, self.html)
  61         if m is None:
  62             self.error(_("LINK_PATTERN not found"))
  63 
  64         self.link = m.group(1)
  65         self.wait(15)
  66 
  67 
  68 getInfo = create_getInfo(UpleaCom)
  69
  [end of module/plugins/hoster/UpleaCom.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/UpleaCom.py b/module/plugins/hoster/UpleaCom.py
  --- a/module/plugins/hoster/UpleaCom.py
  +++ b/module/plugins/hoster/UpleaCom.py
  @@ -10,7 +10,7 @@
   class UpleaCom(XFSHoster):
       __name__    = "UpleaCom"
       __type__    = "hoster"
  -    __version__ = "0.08"
  +    __version__ = "0.10"
   
       __pattern__ = r'https?://(?:www\.)?uplea\.com/dl/\w{15}'
   
  @@ -20,9 +20,11 @@
                          ("GammaC0de", None)]
   
   
  -    NAME_PATTERN = r'class="agmd size18">(?P<N>.+?)<'
  -    SIZE_PATTERN = r'size14">(?P<S>[\d.,]+) (?P<U>[\w^_]+?)</span>'
  -    SIZE_REPLACEMENTS = [('Ko','KB'), ('Mo','MB'), ('Go','GB')]
  +    DISPOSITION = False  #@TODO: Remove in 0.4.10
  +
  +    NAME_PATTERN = r'<span class="gold-text">(?P<N>.+?)</span>'
  +    SIZE_PATTERN = r'<span class="label label-info agmd">(?P<S>[\d.,]+) (?P<U>[\w^_]+?)</span>'
  +    SIZE_REPLACEMENTS = [('ko','KB'), ('mo','MB'), ('go','GB'), ('Ko','KB'), ('Mo','MB'), ('Go','GB')]
   
       OFFLINE_PATTERN = r'>You followed an invalid or expired link'
       PREMIUM_PATTERN = r'You need to have a Premium subscription to download this file'
  
verification_info: {"golden_diff": "diff --git a/module/plugins/hoster/UpleaCom.py b/module/plugins/hoster/UpleaCom.py\n--- a/module/plugins/hoster/UpleaCom.py\n+++ b/module/plugins/hoster/UpleaCom.py\n@@ -10,7 +10,7 @@\n class UpleaCom(XFSHoster):\n     __name__    = \"UpleaCom\"\n     __type__    = \"hoster\"\n-    __version__ = \"0.08\"\n+    __version__ = \"0.10\"\n \n     __pattern__ = r'https?://(?:www\\.)?uplea\\.com/dl/\\w{15}'\n \n@@ -20,9 +20,11 @@\n                        (\"GammaC0de\", None)]\n \n \n-    NAME_PATTERN = r'class=\"agmd size18\">(?P<N>.+?)<'\n-    SIZE_PATTERN = r'size14\">(?P<S>[\\d.,]+) (?P<U>[\\w^_]+?)</span>'\n-    SIZE_REPLACEMENTS = [('Ko','KB'), ('Mo','MB'), ('Go','GB')]\n+    DISPOSITION = False  #@TODO: Remove in 0.4.10\n+\n+    NAME_PATTERN = r'<span class=\"gold-text\">(?P<N>.+?)</span>'\n+    SIZE_PATTERN = r'<span class=\"label label-info agmd\">(?P<S>[\\d.,]+) (?P<U>[\\w^_]+?)</span>'\n+    SIZE_REPLACEMENTS = [('ko','KB'), ('mo','MB'), ('go','GB'), ('Ko','KB'), ('Mo','MB'), ('Go','GB')]\n \n     OFFLINE_PATTERN = r'>You followed an invalid or expired link'\n     PREMIUM_PATTERN = r'You need to have a Premium subscription to download this file'\n", "issue": "uplea plugin (still) broken\nHi again,\n\nsorry but inspite of #1369 and #1375, uplea is still not working; now it's back with downloading the HTML download page...\n24  26.04.2015 23:29:20 INFO    Download finished: *****\n23  26.04.2015 23:29:02 INFO    Download starts: ****\n\nThe resulting file has correct name but is 14KB big; expected size if around 350MB\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\nimport re\n\nfrom urlparse import urljoin\n\nfrom module.plugins.internal.XFSHoster import XFSHoster, create_getInfo\n\n\nclass UpleaCom(XFSHoster):\n    __name__    = \"UpleaCom\"\n    __type__    = \"hoster\"\n    __version__ = \"0.08\"\n\n    __pattern__ = r'https?://(?:www\\.)?uplea\\.com/dl/\\w{15}'\n\n    __description__ = \"\"\"Uplea.com hoster plugin\"\"\"\n    __license__     = \"GPLv3\"\n    __authors__     = [(\"Redleon\", None),\n                       (\"GammaC0de\", None)]\n\n\n    NAME_PATTERN = r'class=\"agmd size18\">(?P<N>.+?)<'\n    SIZE_PATTERN = r'size14\">(?P<S>[\\d.,]+) (?P<U>[\\w^_]+?)</span>'\n    SIZE_REPLACEMENTS = [('Ko','KB'), ('Mo','MB'), ('Go','GB')]\n\n    OFFLINE_PATTERN = r'>You followed an invalid or expired link'\n    PREMIUM_PATTERN = r'You need to have a Premium subscription to download this file'\n\n    LINK_PATTERN = r'\"(https?://\\w+\\.uplea\\.com/anonym/.*?)\"'\n    HOSTER_DOMAIN = \"uplea.com\"\n\n    WAIT_PATTERN = r'timeText: ?([\\d.]+),'\n    STEP_PATTERN = r'<a href=\"(/step/.+)\">'\n\n\n    def setup(self):\n        self.multiDL = False\n        self.chunkLimit = 1\n        self.resumeDownload = True\n\n\n    def handleFree(self, pyfile):\n        m = re.search(self.STEP_PATTERN, self.html)\n        if m is None:\n            self.error(_(\"STEP_PATTERN not found\"))\n\n        self.html = self.load(urljoin(\"http://uplea.com/\", m.group(1)))\n\n        m = re.search(self.WAIT_PATTERN, self.html)\n        if m:\n            self.logDebug(_(\"Waiting %s seconds\") % m.group(1))\n            self.wait(m.group(1), True)\n            self.retry()\n\n        m = re.search(self.PREMIUM_PATTERN, self.html)\n        if m:\n            self.error(_(\"This URL requires a premium account\"))\n\n        m = re.search(self.LINK_PATTERN, self.html)\n        if m is None:\n            self.error(_(\"LINK_PATTERN not found\"))\n\n        self.link = m.group(1)\n        self.wait(15)\n\n\ngetInfo = create_getInfo(UpleaCom)\n", "path": "module/plugins/hoster/UpleaCom.py"}]}