from __future__ import print_function
import re

from streamlink.plugin import Plugin
from streamlink.plugin.api import validate
from streamlink.stream import HLSStream


class PowerApp(Plugin):
    url_re = re.compile(r"https?://(?:www.)?powerapp.com.tr/tv/(\w+)")
    api_url = "http://api.powergroup.com.tr/Channels/{0}/?appRef=iPowerWeb&apiVersion=11"
    api_schema = validate.Schema(validate.all({
        "errorCode": 0,
        "response": {
            "channel_stream_url": validate.url()
        }
    }, validate.get("response")))

    @classmethod
    def can_handle_url(cls, url):
        return cls.url_re.match(url) is not None

    def _get_streams(self):
        channel = self.url_re.match(self.url).group(1)

        res = self.session.http.get(self.api_url.format(channel))
        data = self.session.http.json(res, schema=self.api_schema)

        return HLSStream.parse_variant_playlist(self.session, data["channel_stream_url"])


__plugin__ = PowerApp

src/streamlink/plugins/powerapp.py
from __future__ import print_function
import re

from streamlink.plugin import Plugin
from streamlink.plugin.api import validate
from streamlink.stream import HLSStream


class PowerApp(Plugin):
    url_re = re.compile(r"https?://(?:www.)?powerapp.com.tr/tvs?/(\w+)")
    api_url = "http://api.powergroup.com.tr/Channels/{0}/?appRef=iPowerWeb&apiVersion=11"
    api_schema = validate.Schema(validate.all({
        "errorCode": 0,
        "response": {
            "channel_stream_url": validate.url()
        }
    }, validate.get("response")))

    @classmethod
    def can_handle_url(cls, url):
        return cls.url_re.match(url) is not None

    def _get_streams(self):
        channel = self.url_re.match(self.url).group(1)

        res = self.session.http.get(self.api_url.format(channel))
        data = self.session.http.json(res, schema=self.api_schema)

        return HLSStream.parse_variant_playlist(self.session, data["channel_stream_url"])


__plugin__ = PowerApp

src/streamlink/plugins/powerapp.py
diff --git a/src/streamlink/plugins/powerapp.py b/src/streamlink/plugins/powerapp.py
index 0ad0dda1899..702505e5f6c 100644
--- a/src/streamlink/plugins/powerapp.py
+++ b/src/streamlink/plugins/powerapp.py
@@ -7,7 +7,7 @@
 
 
 class PowerApp(Plugin):
-    url_re = re.compile(r"https?://(?:www.)?powerapp.com.tr/tv/(\w+)")
+    url_re = re.compile(r"https?://(?:www.)?powerapp.com.tr/tvs?/(\w+)")
     api_url = "http://api.powergroup.com.tr/Channels/{0}/?appRef=iPowerWeb&apiVersion=11"
     api_schema = validate.Schema(validate.all({
         "errorCode": 0,
diff --git a/tests/plugins/test_powerapp.py b/tests/plugins/test_powerapp.py
index 043e4df9324..f000b5010d0 100644
--- a/tests/plugins/test_powerapp.py
+++ b/tests/plugins/test_powerapp.py
@@ -9,9 +9,10 @@ def test_can_handle_url(self):
             'http://powerapp.com.tr/tv/powertv4k',
             'http://powerapp.com.tr/tv/powerturktv4k',
             'http://powerapp.com.tr/tv/powerEarthTV',
+            'http://www.powerapp.com.tr/tvs/powertv'
         ]
         for url in should_match:
-            self.assertTrue(PowerApp.can_handle_url(url))
+            self.assertTrue(PowerApp.can_handle_url(url), url)
 
     def test_can_handle_url_negative(self):
         should_not_match = [

powerapp.py No plugin can handle URL
## Error Report

- [X] This is a bug report and I have read the Posting Guidelines.

### Description

 powerapp.com.tr should be able to play the stations


### Expected / actual behavior

Inserting the page in the streamlink does not play the stream. About my web browser Firefox I see the picture and hear the sound synonymous

### Reproduction steps / Explicit stream URLs to test

1.www.powerapp.com.tr/tvs/powertv/

streamlink http://www.powerapp.com.tr/tvs/powertv best

### log output

> streamlink http://www.powerapp.com.tr/tvs/powertv best
error: No plugin can handle URL: http://www.powerapp.com.tr/tvs/powertv
> error: No plugin can handle URL: http://www.powerapp.com.tr/tvs/powertv
error:: The term "error:" was not used as the name of a cmdlet, a function, a script file, or a
recognized executable program. Check the spelling of the name, or if the path is correct (provided
contain) and repeat the process.
In line: 1 character: 1
+ error: No plugin can handle URL: http://www.powerapp.com.tr/tvs/power ...
+~~~~~
    + CategoryInfo: ObjectNotFound: (error :: String) [], CommandNotFoundException
    + FullyQualifiedErrorId: CommandNotFoundException


### Additional comments, screenshots, etc.

 Screenshot

https://i.ibb.co/g99nXC0/france.jpg
