Repository: streamlink/streamlink

Issue:
Can't find "tv3cat" plugin
## Plugin Issue

<!-- Replace [ ] with [x] in order to check the box -->
- [ X ] This is a plugin issue and I have read the contribution guidelines.


### Description

<!-- Explain the plugin issue as thoroughly as you can. -->

A image is worth a thousand words.

![imatge](https://user-images.githubusercontent.com/7274874/95747957-925c8a80-0c99-11eb-95f9-5d37261e0429.png)

### Reproduction steps 

<!-- How can we reproduce this? Please note the exact steps below using the list format supplied. If you need more steps please add them. -->

I've just using the "python3-streamlink" package provided by Fedora 32

Thanks!



Discussion:
**Feedback/answer (see ticked items):**

As requested in the plugin issue template:

- [ ] Description and/or reproduction steps are insufficiently detailed
- [ ] Streamlink version in use not specified
- [ ] Full ```--loglevel debug``` log output not provided
- [ ] Research of prior issues/fixes appears to be insufficient [1]

Other feedback:
- [ ] Issue is out of scope and/or should be reported/help sought elsewhere
- [ ] Issue appears to unnecessarily duplicate another issue that is open/closed
- [ ] User appears to be using an outdated Streamlink version/plugin [2] [3]
- [x] Other (see below)

- Other: In the future, can you please provide the log output as text, not an image, thanks.

It looks like the URL matching needs a little tweaking and some other small issues with it fixed.  For the time being, you can get it to work using the ```http://``` scheme and by appending a ```/``` to the end of the URL you are using:
```
streamlink http://www.ccma.cat/tv3/directe/324/
[cli][info] Found matching plugin tv3cat for URL http://www.ccma.cat/tv3/directe/324/
Available streams: 180p_426k (worst), 360p_646k, 360p_1416k (best)
```

~~Please amend/close your issue accordingly and/or undertake the requested prior research before opening an issue in future.~~

[1] [Search all open/closed issues/pull requests](https://github.com/streamlink/streamlink/issues?q=)
[2] [Install the most recent version of Streamlink](https://streamlink.github.io/install.html)
[3] [Check the master branch for plugin updates](https://github.com/streamlink/streamlink/tree/master/src/streamlink/plugins) 

Resolving patch:
diff --git a/src/streamlink/plugins/tv3cat.py b/src/streamlink/plugins/tv3cat.py
--- a/src/streamlink/plugins/tv3cat.py
+++ b/src/streamlink/plugins/tv3cat.py
@@ -9,7 +9,7 @@
 
 
 class TV3Cat(Plugin):
-    _url_re = re.compile(r"http://(?:www.)?ccma.cat/tv3/directe/(.+?)/")
+    _url_re = re.compile(r"https?://(?:www\.)?ccma\.cat/tv3/directe/(.+?)/")
     _stream_info_url = "http://dinamics.ccma.cat/pvideo/media.jsp" \
                        "?media=video&version=0s&idint={ident}&profile=pc&desplacament=0"
     _media_schema = validate.Schema({
@@ -39,7 +39,6 @@ def _get_streams(self):
                     return HLSStream.parse_variant_playlist(self.session, stream['url'], name_fmt="{pixels}_{bitrate}")
                 except PluginError:
                     log.debug("Failed to get streams for: {0}".format(stream['geo']))
-                    pass
 
 
 __plugin__ = TV3Cat


Test patch:
diff --git a/tests/plugins/test_tv3cat.py b/tests/plugins/test_tv3cat.py
--- a/tests/plugins/test_tv3cat.py
+++ b/tests/plugins/test_tv3cat.py
@@ -6,8 +6,14 @@
 class TestPluginTV3Cat(unittest.TestCase):
     def test_can_handle_url(self):
         should_match = [
+            'http://ccma.cat/tv3/directe/tv3/',
+            'http://ccma.cat/tv3/directe/324/',
+            'https://ccma.cat/tv3/directe/tv3/',
+            'https://ccma.cat/tv3/directe/324/',
             'http://www.ccma.cat/tv3/directe/tv3/',
             'http://www.ccma.cat/tv3/directe/324/',
+            'https://www.ccma.cat/tv3/directe/tv3/',
+            'https://www.ccma.cat/tv3/directe/324/',
         ]
         for url in should_match:
             self.assertTrue(TV3Cat.can_handle_url(url))