prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  https://www.micous.com/ Site closing webcasts
  <!--
  Thanks for reporting a plugin issue!
  USE THE TEMPLATE. Otherwise your plugin issue may be rejected.
  
  First, see the contribution guidelines:
  https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink
  
  Also check the list of open and closed plugin issues:
  https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22
  
  Please see the text preview to avoid unnecessary formatting errors.
  -->
  
  
  ## Plugin Issue
  
  <!-- Replace the space character between the square brackets with an x in order to check the boxes -->
  - [ ] This is a plugin issue and I have read the contribution guidelines.
  - [ ] I am using the latest development version from the master branch.
  
  
  ### Description
  I was checking the m3u8 codes for Tango Live so that it would benefit people and maybe we can bring plugins but now I have checked and the mico.us plugin does not work because mico.us is no longer working. It looks like it has turned off broadcasting and playback, I guess only broadcasts can be followed through the application and need to be checked. 
  <!-- Explain the plugin issue as thoroughly as you can. -->
  
  
  ### Reproduction steps / Explicit stream URLs to test
  this? Please note the exact steps below using the list format supplied. If you need more steps please add them. -->
  
  1. ...https://www.micous.com/
  2. ...
  3. ...
  
  
  ### Log output
  
  <!--
  TEXT LOG OUTPUT IS REQUIRED for a plugin issue!
  Use the `--loglevel debug` parameter and avoid using parameters which suppress log output.
  https://streamlink.github.io/cli.html#cmdoption-l
  
  Make sure to **remove usernames and passwords**
  You can copy the output to https://gist.github.com/ or paste it below.
  
  Don't post screenshots of the log output and instead copy the text from your terminal application.
  -->
  
  ```
  REPLACE THIS TEXT WITH THE LOG OUTPUT
  ```
  
  
  ### Additional comments, etc.
  
  
  
  [Love Streamlink? Please consider supporting our collective. Thanks!](https://opencollective.com/streamlink/donate)
  
  
  </issue>
  <code>
  [start of src/streamlink/plugins/mico.py]
  1 import logging
  2 import re
  3 
  4 from streamlink.plugin import Plugin
  5 from streamlink.plugin.api import validate
  6 from streamlink.stream import HLSStream
  7 from streamlink.utils import parse_json
  8 from streamlink.utils.url import update_scheme
  9 
  10 log = logging.getLogger(__name__)
  11 
  12 
  13 class Mico(Plugin):
  14     author = None
  15     category = None
  16     title = None
  17 
  18     url_re = re.compile(r'https?://(?:www\.)?micous\.com/live/\d+')
  19     json_data_re = re.compile(r'win._profile\s*=\s*({.*})')
  20 
  21     _json_data_schema = validate.Schema(
  22         validate.transform(json_data_re.search),
  23         validate.any(None, validate.all(
  24             validate.get(1),
  25             validate.transform(parse_json),
  26             validate.any(None, validate.all({
  27                 'mico_id': int,
  28                 'nickname': validate.text,
  29                 'h5_url': validate.all(
  30                     validate.transform(lambda x: update_scheme('http:', x)),
  31                     validate.url(),
  32                 ),
  33                 'is_live': bool,
  34             })),
  35         )),
  36     )
  37 
  38     @classmethod
  39     def can_handle_url(cls, url):
  40         return cls.url_re.match(url) is not None
  41 
  42     def get_author(self):
  43         if self.author is not None:
  44             return self.author
  45 
  46     def get_category(self):
  47         if self.category is not None:
  48             return self.category
  49 
  50     def get_title(self):
  51         if self.title is not None:
  52             return self.title
  53 
  54     def _get_streams(self):
  55         json_data = self.session.http.get(self.url, schema=self._json_data_schema)
  56 
  57         if not json_data:
  58             log.error('Failed to get JSON data')
  59             return
  60 
  61         if not json_data['is_live']:
  62             log.info('This stream is no longer online')
  63             return
  64 
  65         self.author = json_data['mico_id']
  66         self.category = 'Live'
  67         self.title = json_data['nickname']
  68 
  69         return HLSStream.parse_variant_playlist(self.session, json_data['h5_url'])
  70 
  71 
  72 __plugin__ = Mico
  73
  [end of src/streamlink/plugins/mico.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/src/streamlink/plugins/mico.py b/src/streamlink/plugins/mico.py
  deleted file mode 100644
  --- a/src/streamlink/plugins/mico.py
  +++ /dev/null
  @@ -1,72 +0,0 @@
  -import logging
  -import re
  -
  -from streamlink.plugin import Plugin
  -from streamlink.plugin.api import validate
  -from streamlink.stream import HLSStream
  -from streamlink.utils import parse_json
  -from streamlink.utils.url import update_scheme
  -
  -log = logging.getLogger(__name__)
  -
  -
  -class Mico(Plugin):
  -    author = None
  -    category = None
  -    title = None
  -
  -    url_re = re.compile(r'https?://(?:www\.)?micous\.com/live/\d+')
  -    json_data_re = re.compile(r'win._profile\s*=\s*({.*})')
  -
  -    _json_data_schema = validate.Schema(
  -        validate.transform(json_data_re.search),
  -        validate.any(None, validate.all(
  -            validate.get(1),
  -            validate.transform(parse_json),
  -            validate.any(None, validate.all({
  -                'mico_id': int,
  -                'nickname': validate.text,
  -                'h5_url': validate.all(
  -                    validate.transform(lambda x: update_scheme('http:', x)),
  -                    validate.url(),
  -                ),
  -                'is_live': bool,
  -            })),
  -        )),
  -    )
  -
  -    @classmethod
  -    def can_handle_url(cls, url):
  -        return cls.url_re.match(url) is not None
  -
  -    def get_author(self):
  -        if self.author is not None:
  -            return self.author
  -
  -    def get_category(self):
  -        if self.category is not None:
  -            return self.category
  -
  -    def get_title(self):
  -        if self.title is not None:
  -            return self.title
  -
  -    def _get_streams(self):
  -        json_data = self.session.http.get(self.url, schema=self._json_data_schema)
  -
  -        if not json_data:
  -            log.error('Failed to get JSON data')
  -            return
  -
  -        if not json_data['is_live']:
  -            log.info('This stream is no longer online')
  -            return
  -
  -        self.author = json_data['mico_id']
  -        self.category = 'Live'
  -        self.title = json_data['nickname']
  -
  -        return HLSStream.parse_variant_playlist(self.session, json_data['h5_url'])
  -
  -
  -__plugin__ = Mico
  
verification_info: {"golden_diff": "diff --git a/src/streamlink/plugins/mico.py b/src/streamlink/plugins/mico.py\ndeleted file mode 100644\n--- a/src/streamlink/plugins/mico.py\n+++ /dev/null\n@@ -1,72 +0,0 @@\n-import logging\n-import re\n-\n-from streamlink.plugin import Plugin\n-from streamlink.plugin.api import validate\n-from streamlink.stream import HLSStream\n-from streamlink.utils import parse_json\n-from streamlink.utils.url import update_scheme\n-\n-log = logging.getLogger(__name__)\n-\n-\n-class Mico(Plugin):\n-    author = None\n-    category = None\n-    title = None\n-\n-    url_re = re.compile(r'https?://(?:www\\.)?micous\\.com/live/\\d+')\n-    json_data_re = re.compile(r'win._profile\\s*=\\s*({.*})')\n-\n-    _json_data_schema = validate.Schema(\n-        validate.transform(json_data_re.search),\n-        validate.any(None, validate.all(\n-            validate.get(1),\n-            validate.transform(parse_json),\n-            validate.any(None, validate.all({\n-                'mico_id': int,\n-                'nickname': validate.text,\n-                'h5_url': validate.all(\n-                    validate.transform(lambda x: update_scheme('http:', x)),\n-                    validate.url(),\n-                ),\n-                'is_live': bool,\n-            })),\n-        )),\n-    )\n-\n-    @classmethod\n-    def can_handle_url(cls, url):\n-        return cls.url_re.match(url) is not None\n-\n-    def get_author(self):\n-        if self.author is not None:\n-            return self.author\n-\n-    def get_category(self):\n-        if self.category is not None:\n-            return self.category\n-\n-    def get_title(self):\n-        if self.title is not None:\n-            return self.title\n-\n-    def _get_streams(self):\n-        json_data = self.session.http.get(self.url, schema=self._json_data_schema)\n-\n-        if not json_data:\n-            log.error('Failed to get JSON data')\n-            return\n-\n-        if not json_data['is_live']:\n-            log.info('This stream is no longer online')\n-            return\n-\n-        self.author = json_data['mico_id']\n-        self.category = 'Live'\n-        self.title = json_data['nickname']\n-\n-        return HLSStream.parse_variant_playlist(self.session, json_data['h5_url'])\n-\n-\n-__plugin__ = Mico\n", "issue": "https://www.micous.com/ Site closing webcasts\n<!--\r\nThanks for reporting a plugin issue!\r\nUSE THE TEMPLATE. Otherwise your plugin issue may be rejected.\r\n\r\nFirst, see the contribution guidelines:\r\nhttps://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink\r\n\r\nAlso check the list of open and closed plugin issues:\r\nhttps://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22\r\n\r\nPlease see the text preview to avoid unnecessary formatting errors.\r\n-->\r\n\r\n\r\n## Plugin Issue\r\n\r\n<!-- Replace the space character between the square brackets with an x in order to check the boxes -->\r\n- [ ] This is a plugin issue and I have read the contribution guidelines.\r\n- [ ] I am using the latest development version from the master branch.\r\n\r\n\r\n### Description\r\nI was checking the m3u8 codes for Tango Live so that it would benefit people and maybe we can bring plugins but now I have checked and the mico.us plugin does not work because mico.us is no longer working. It looks like it has turned off broadcasting and playback, I guess only broadcasts can be followed through the application and need to be checked. \r\n<!-- Explain the plugin issue as thoroughly as you can. -->\r\n\r\n\r\n### Reproduction steps / Explicit stream URLs to test\r\nthis? Please note the exact steps below using the list format supplied. If you need more steps please add them. -->\r\n\r\n1. ...https://www.micous.com/\r\n2. ...\r\n3. ...\r\n\r\n\r\n### Log output\r\n\r\n<!--\r\nTEXT LOG OUTPUT IS REQUIRED for a plugin issue!\r\nUse the `--loglevel debug` parameter and avoid using parameters which suppress log output.\r\nhttps://streamlink.github.io/cli.html#cmdoption-l\r\n\r\nMake sure to **remove usernames and passwords**\r\nYou can copy the output to https://gist.github.com/ or paste it below.\r\n\r\nDon't post screenshots of the log output and instead copy the text from your terminal application.\r\n-->\r\n\r\n```\r\nREPLACE THIS TEXT WITH THE LOG OUTPUT\r\n```\r\n\r\n\r\n### Additional comments, etc.\r\n\r\n\r\n\r\n[Love Streamlink? Please consider supporting our collective. Thanks!](https://opencollective.com/streamlink/donate)\r\n\n", "before_files": [{"content": "import logging\nimport re\n\nfrom streamlink.plugin import Plugin\nfrom streamlink.plugin.api import validate\nfrom streamlink.stream import HLSStream\nfrom streamlink.utils import parse_json\nfrom streamlink.utils.url import update_scheme\n\nlog = logging.getLogger(__name__)\n\n\nclass Mico(Plugin):\n    author = None\n    category = None\n    title = None\n\n    url_re = re.compile(r'https?://(?:www\\.)?micous\\.com/live/\\d+')\n    json_data_re = re.compile(r'win._profile\\s*=\\s*({.*})')\n\n    _json_data_schema = validate.Schema(\n        validate.transform(json_data_re.search),\n        validate.any(None, validate.all(\n            validate.get(1),\n            validate.transform(parse_json),\n            validate.any(None, validate.all({\n                'mico_id': int,\n                'nickname': validate.text,\n                'h5_url': validate.all(\n                    validate.transform(lambda x: update_scheme('http:', x)),\n                    validate.url(),\n                ),\n                'is_live': bool,\n            })),\n        )),\n    )\n\n    @classmethod\n    def can_handle_url(cls, url):\n        return cls.url_re.match(url) is not None\n\n    def get_author(self):\n        if self.author is not None:\n            return self.author\n\n    def get_category(self):\n        if self.category is not None:\n            return self.category\n\n    def get_title(self):\n        if self.title is not None:\n            return self.title\n\n    def _get_streams(self):\n        json_data = self.session.http.get(self.url, schema=self._json_data_schema)\n\n        if not json_data:\n            log.error('Failed to get JSON data')\n            return\n\n        if not json_data['is_live']:\n            log.info('This stream is no longer online')\n            return\n\n        self.author = json_data['mico_id']\n        self.category = 'Live'\n        self.title = json_data['nickname']\n\n        return HLSStream.parse_variant_playlist(self.session, json_data['h5_url'])\n\n\n__plugin__ = Mico\n", "path": "src/streamlink/plugins/mico.py"}]}