prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  plugins.useetv: log if no link has been found
  <!--
  Thanks for opening a pull request!
  
  Before you continue, please make sure that you have read and understood the contribution guidelines, otherwise your changes may be rejected:
  https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink
  
  If possible, run the tests, perform code linting and build the documentation locally on your system first to avoid unnecessary build failures:
  https://streamlink.github.io/latest/developing.html#validating-changes
  
  Also don't forget to add a meaningful description of your changes, so that the reviewing process is as simple as possible for the maintainers.
  
  Thank you very much!
  -->
  
  **Why this PR ?**
  
  This PR has been made to verify if no link has been found. Indeed, USeeTV doesn't provide all his channels worldwide. Some channels are blocked for Indonesian people only, and some others need a subscription to work (see beIN Asia as an example). Some channels like SeaToday would work, but channels like this one : 
  ![image](https://user-images.githubusercontent.com/30985701/170096616-4d22b9aa-9972-418e-8bc6-1c99be1c1e88.png)
  will only show a Geo-restriction message above the player, telling the end-user he has no access to the stream. 
  
  This also reflects inside the player, meaning no link can be scraped.
  
  
  </issue>
  <code>
  [start of src/streamlink/plugins/useetv.py]
  1 """
  2 $description Live TV channels and video on-demand service from UseeTV, owned by Telkom Indonesia.
  3 $url useetv.com
  4 $type live, vod
  5 """
  6 
  7 import re
  8 
  9 from streamlink.plugin import Plugin, pluginmatcher
  10 from streamlink.plugin.api import validate
  11 from streamlink.stream.dash import DASHStream
  12 from streamlink.stream.hls import HLSStream
  13 
  14 
  15 @pluginmatcher(re.compile(r"https?://(?:www\.)?useetv\.com/"))
  16 class UseeTV(Plugin):
  17     def find_url(self):
  18         url_re = re.compile(r"""['"](https://.*?/(?:[Pp]laylist\.m3u8|manifest\.mpd)[^'"]+)['"]""")
  19 
  20         return self.session.http.get(self.url, schema=validate.Schema(
  21             validate.parse_html(),
  22             validate.any(
  23                 validate.all(
  24                     validate.xml_xpath_string("""
  25                         .//script[contains(text(), 'laylist.m3u8') or contains(text(), 'manifest.mpd')][1]/text()
  26                     """),
  27                     str,
  28                     validate.transform(url_re.search),
  29                     validate.any(None, validate.all(validate.get(1), validate.url())),
  30                 ),
  31                 validate.all(
  32                     validate.xml_xpath_string(".//video[@id='video-player']/source/@src"),
  33                     validate.any(None, validate.url()),
  34                 ),
  35             ),
  36         ))
  37 
  38     def _get_streams(self):
  39         url = self.find_url()
  40 
  41         if url and ".m3u8" in url:
  42             return HLSStream.parse_variant_playlist(self.session, url)
  43         elif url and ".mpd" in url:
  44             return DASHStream.parse_manifest(self.session, url)
  45 
  46 
  47 __plugin__ = UseeTV
  48
  [end of src/streamlink/plugins/useetv.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/useetv.py b/src/streamlink/plugins/useetv.py
  --- a/src/streamlink/plugins/useetv.py
  +++ b/src/streamlink/plugins/useetv.py
  @@ -4,6 +4,7 @@
   $type live, vod
   """
   
  +import logging
   import re
   
   from streamlink.plugin import Plugin, pluginmatcher
  @@ -11,32 +12,46 @@
   from streamlink.stream.dash import DASHStream
   from streamlink.stream.hls import HLSStream
   
  +log = logging.getLogger(__name__)
  +
   
   @pluginmatcher(re.compile(r"https?://(?:www\.)?useetv\.com/"))
   class UseeTV(Plugin):
  -    def find_url(self):
  -        url_re = re.compile(r"""['"](https://.*?/(?:[Pp]laylist\.m3u8|manifest\.mpd)[^'"]+)['"]""")
  +    def _get_streams(self):
  +        root = self.session.http.get(self.url, schema=validate.Schema(validate.parse_html()))
  +
  +        for needle, errormsg in (
  +            (
  +                "This service is not available in your Country",
  +                "The content is not available in your region",
  +            ),
  +            (
  +                "Silahkan login Menggunakan akun MyIndihome dan berlangganan minipack",
  +                "The content is not available without a subscription",
  +            ),
  +        ):
  +            if validate.Schema(validate.xml_xpath(f""".//script[contains(text(), '"{needle}"')]""")).validate(root):
  +                log.error(errormsg)
  +                return
   
  -        return self.session.http.get(self.url, schema=validate.Schema(
  -            validate.parse_html(),
  +        url = validate.Schema(
               validate.any(
                   validate.all(
                       validate.xml_xpath_string("""
                           .//script[contains(text(), 'laylist.m3u8') or contains(text(), 'manifest.mpd')][1]/text()
                       """),
                       str,
  -                    validate.transform(url_re.search),
  -                    validate.any(None, validate.all(validate.get(1), validate.url())),
  +                    validate.transform(
  +                        re.compile(r"""(?P<q>['"])(?P<url>https://.*?/(?:[Pp]laylist\.m3u8|manifest\.mpd).+?)(?P=q)""").search
  +                    ),
  +                    validate.any(None, validate.all(validate.get("url"), validate.url())),
                   ),
                   validate.all(
                       validate.xml_xpath_string(".//video[@id='video-player']/source/@src"),
                       validate.any(None, validate.url()),
                   ),
  -            ),
  -        ))
  -
  -    def _get_streams(self):
  -        url = self.find_url()
  +            )
  +        ).validate(root)
   
           if url and ".m3u8" in url:
               return HLSStream.parse_variant_playlist(self.session, url)
  
verification_info: {"golden_diff": "diff --git a/src/streamlink/plugins/useetv.py b/src/streamlink/plugins/useetv.py\n--- a/src/streamlink/plugins/useetv.py\n+++ b/src/streamlink/plugins/useetv.py\n@@ -4,6 +4,7 @@\n $type live, vod\n \"\"\"\n \n+import logging\n import re\n \n from streamlink.plugin import Plugin, pluginmatcher\n@@ -11,32 +12,46 @@\n from streamlink.stream.dash import DASHStream\n from streamlink.stream.hls import HLSStream\n \n+log = logging.getLogger(__name__)\n+\n \n @pluginmatcher(re.compile(r\"https?://(?:www\\.)?useetv\\.com/\"))\n class UseeTV(Plugin):\n-    def find_url(self):\n-        url_re = re.compile(r\"\"\"['\"](https://.*?/(?:[Pp]laylist\\.m3u8|manifest\\.mpd)[^'\"]+)['\"]\"\"\")\n+    def _get_streams(self):\n+        root = self.session.http.get(self.url, schema=validate.Schema(validate.parse_html()))\n+\n+        for needle, errormsg in (\n+            (\n+                \"This service is not available in your Country\",\n+                \"The content is not available in your region\",\n+            ),\n+            (\n+                \"Silahkan login Menggunakan akun MyIndihome dan berlangganan minipack\",\n+                \"The content is not available without a subscription\",\n+            ),\n+        ):\n+            if validate.Schema(validate.xml_xpath(f\"\"\".//script[contains(text(), '\"{needle}\"')]\"\"\")).validate(root):\n+                log.error(errormsg)\n+                return\n \n-        return self.session.http.get(self.url, schema=validate.Schema(\n-            validate.parse_html(),\n+        url = validate.Schema(\n             validate.any(\n                 validate.all(\n                     validate.xml_xpath_string(\"\"\"\n                         .//script[contains(text(), 'laylist.m3u8') or contains(text(), 'manifest.mpd')][1]/text()\n                     \"\"\"),\n                     str,\n-                    validate.transform(url_re.search),\n-                    validate.any(None, validate.all(validate.get(1), validate.url())),\n+                    validate.transform(\n+                        re.compile(r\"\"\"(?P<q>['\"])(?P<url>https://.*?/(?:[Pp]laylist\\.m3u8|manifest\\.mpd).+?)(?P=q)\"\"\").search\n+                    ),\n+                    validate.any(None, validate.all(validate.get(\"url\"), validate.url())),\n                 ),\n                 validate.all(\n                     validate.xml_xpath_string(\".//video[@id='video-player']/source/@src\"),\n                     validate.any(None, validate.url()),\n                 ),\n-            ),\n-        ))\n-\n-    def _get_streams(self):\n-        url = self.find_url()\n+            )\n+        ).validate(root)\n \n         if url and \".m3u8\" in url:\n             return HLSStream.parse_variant_playlist(self.session, url)\n", "issue": "plugins.useetv: log if no link has been found\n<!--\r\nThanks for opening a pull request!\r\n\r\nBefore you continue, please make sure that you have read and understood the contribution guidelines, otherwise your changes may be rejected:\r\nhttps://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink\r\n\r\nIf possible, run the tests, perform code linting and build the documentation locally on your system first to avoid unnecessary build failures:\r\nhttps://streamlink.github.io/latest/developing.html#validating-changes\r\n\r\nAlso don't forget to add a meaningful description of your changes, so that the reviewing process is as simple as possible for the maintainers.\r\n\r\nThank you very much!\r\n-->\r\n\r\n**Why this PR ?**\r\n\r\nThis PR has been made to verify if no link has been found. Indeed, USeeTV doesn't provide all his channels worldwide. Some channels are blocked for Indonesian people only, and some others need a subscription to work (see beIN Asia as an example). Some channels like SeaToday would work, but channels like this one : \r\n![image](https://user-images.githubusercontent.com/30985701/170096616-4d22b9aa-9972-418e-8bc6-1c99be1c1e88.png)\r\nwill only show a Geo-restriction message above the player, telling the end-user he has no access to the stream. \r\n\r\nThis also reflects inside the player, meaning no link can be scraped.\r\n\n", "before_files": [{"content": "\"\"\"\n$description Live TV channels and video on-demand service from UseeTV, owned by Telkom Indonesia.\n$url useetv.com\n$type live, vod\n\"\"\"\n\nimport re\n\nfrom streamlink.plugin import Plugin, pluginmatcher\nfrom streamlink.plugin.api import validate\nfrom streamlink.stream.dash import DASHStream\nfrom streamlink.stream.hls import HLSStream\n\n\n@pluginmatcher(re.compile(r\"https?://(?:www\\.)?useetv\\.com/\"))\nclass UseeTV(Plugin):\n    def find_url(self):\n        url_re = re.compile(r\"\"\"['\"](https://.*?/(?:[Pp]laylist\\.m3u8|manifest\\.mpd)[^'\"]+)['\"]\"\"\")\n\n        return self.session.http.get(self.url, schema=validate.Schema(\n            validate.parse_html(),\n            validate.any(\n                validate.all(\n                    validate.xml_xpath_string(\"\"\"\n                        .//script[contains(text(), 'laylist.m3u8') or contains(text(), 'manifest.mpd')][1]/text()\n                    \"\"\"),\n                    str,\n                    validate.transform(url_re.search),\n                    validate.any(None, validate.all(validate.get(1), validate.url())),\n                ),\n                validate.all(\n                    validate.xml_xpath_string(\".//video[@id='video-player']/source/@src\"),\n                    validate.any(None, validate.url()),\n                ),\n            ),\n        ))\n\n    def _get_streams(self):\n        url = self.find_url()\n\n        if url and \".m3u8\" in url:\n            return HLSStream.parse_variant_playlist(self.session, url)\n        elif url and \".mpd\" in url:\n            return DASHStream.parse_manifest(self.session, url)\n\n\n__plugin__ = UseeTV\n", "path": "src/streamlink/plugins/useetv.py"}]}