Skip to content

plugins.piaulizaportal: new plugin #5508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 21, 2023
Merged

plugins.piaulizaportal: new plugin #5508

merged 3 commits into from
Aug 21, 2023

Conversation

pzhlkj6612
Copy link
Contributor

Summary

This is a very simple extractor for video platform "ULIZA" operated by the PIA Corporation.
Tickets purchased at "PIA LIVE STREAM" are used for "ULIZA".

log of PIA LIVE STREAM

Bug

There are two public videos:

The first one works well with this plugin; the second one, however, makes VLC player end immediately.

M3U8 playlists and logs are as follows:

M3U8 playlists and logs

The master M3U8 is:

#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=4600000
https://d3b2nkk5uuz3xf.cloudfront.net/5165744460395/20210114121519_7aa7c28d5006907933df1d4a495206decd8dc14bf808af21c757a7dc16aa9999_1.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2300000
https://d3b2nkk5uuz3xf.cloudfront.net/5165744460395/20210114121519_8877176d61b6d0ea48f3296e2408c660f5370758ce59e89ba4bcd7dcfbea291d_2.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1200000
https://d3b2nkk5uuz3xf.cloudfront.net/5165744460395/20210114121519_3485c570e7b228104d6620427c38782397b310ed6123ce74cd316aec6da90d0c_3.m3u8

The BANDWIDTH=1200000 M3U8 is:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:11
#EXT-X-KEY:METHOD=AES-128,URI="..."
#EXTINF:10.033333,
20210114121519_3485c570e7b228104d6620427c38782397b310ed6123ce74cd316aec6da90d0c_3/mediafile_0.ts
#EXTINF:10.000000,
20210114121519_3485c570e7b228104d6620427c38782397b310ed6123ce74cd316aec6da90d0c_3/mediafile_1.ts
#EXTINF:10.000000,
20210114121519_3485c570e7b228104d6620427c38782397b310ed6123ce74cd316aec6da90d0c_3/mediafile_2.ts
#EXTINF:10.000000,
20210114121519_3485c570e7b228104d6620427c38782397b310ed6123ce74cd316aec6da90d0c_3/mediafile_3.ts
#EXTINF:10.000000,
20210114121519_3485c570e7b228104d6620427c38782397b310ed6123ce74cd316aec6da90d0c_3/mediafile_4.ts
#EXTINF:10.000000,
20210114121519_3485c570e7b228104d6620427c38782397b310ed6123ce74cd316aec6da90d0c_3/mediafile_5.ts
#EXT-X-ENDLIST

Log:

[00:00:03.599149][cli][debug] OS:         Windows 10
[00:00:03.600146][cli][debug] Python:     3.8.10
[00:00:03.600146][cli][debug] OpenSSL:    OpenSSL 1.1.1k  25 Mar 2021
[00:00:03.600146][cli][debug] Streamlink: 6.1.0+7.gb491da02
[00:00:03.603152][cli][debug] Dependencies:
[00:00:03.610152][cli][debug]  isodate: 0.6.1
[00:00:03.612152][cli][debug]  lxml: 4.9.1
[00:00:03.616151][cli][debug]  pycountry: 22.3.5
[00:00:03.618152][cli][debug]  pycryptodome: 3.15.0
[00:00:03.621133][cli][debug]  PySocks: 1.7.1
[00:00:03.624133][cli][debug]  requests: 2.28.1
[00:00:03.627137][cli][debug]  websocket-client: 1.4.1
[00:00:03.629227][cli][debug]  importlib-metadata: 5.0.0
[00:00:03.629227][cli][debug] Arguments:
[00:00:03.630227][cli][debug]  url=https://ulizaportal.jp/pages/005e1b23-fe93-5780-19a0-98e917cc4b7d?expires=4102412400&signature=f422a993b683e1068f946caf406d211c17d1ef17da8bef3df4a519502155aa91&version=1
[00:00:03.630227][cli][debug]  stream=['worst']
[00:00:03.630227][cli][debug]  --loglevel=trace
[00:00:03.632228][cli][info] Found matching plugin piaulizaportal for URL https://ulizaportal.jp/pages/005e1b23-fe93-5780-19a0-98e917cc4b7d?expires=4102412400&signature=f422a993b683e1068f946caf406d211c17d1ef17da8bef3df4a519502155aa91&version=1
[00:00:04.733108][utils.l10n][debug] Language code: en_US
[00:00:05.142848][cli][info] Available streams: 1200k (worst), 2300k, 4600k (best)
[00:00:05.142848][cli][info] Opening stream: 1200k (hls)
[00:00:05.143836][cli][info] Starting player: C:\Program Files\VideoLAN\VLC\vlc.exe
[00:00:05.146843][cli][debug] Pre-buffering 8192 bytes
[00:00:05.147835][stream.hls][debug] Reloading playlist
[00:00:05.335665][stream.hls][debug] Segments in this playlist are encrypted
[00:00:05.336179][stream.hls][debug] First Sequence: 0; Last Sequence: 5
[00:00:05.336240][stream.hls][debug] Start offset: 0; Duration: None; Start Sequence: 0; End Sequence: 5
[00:00:05.336240][stream.hls][debug] Adding segment 0 to queue
[00:00:05.338386][stream.hls][debug] Adding segment 1 to queue
[00:00:05.338386][stream.hls][debug] Adding segment 2 to queue
[00:00:05.338955][stream.hls][debug] Adding segment 3 to queue
[00:00:05.339488][stream.hls][debug] Adding segment 4 to queue
[00:00:05.339488][stream.hls][debug] Adding segment 5 to queue
[00:00:05.340574][stream.segmented][debug] Closing worker thread
[00:00:05.598791][stream.hls][debug] Writing segment 0 to output
[00:00:05.713460][stream.hls][debug] Segment 0 complete
[00:00:05.717269][cli.output][debug] Opening subprocess: ['C:\\Program Files\\VideoLAN\\VLC\\vlc.exe', '--input-title-format', 'https://ulizaportal.jp/pages/005e1b23-fe93-5780-19a0-98e917cc4b7d?expires=4102412400&signature=f422a993b683e1068f946caf406d211c17d1ef17da8bef3df4a519502155aa91&version=1', '-']
[00:00:05.772055][stream.hls][debug] Writing segment 1 to output
[00:00:05.780827][stream.hls][debug] Segment 1 complete
[00:00:05.855920][stream.hls][debug] Writing segment 2 to output
[00:00:05.863161][stream.hls][debug] Segment 2 complete
[00:00:05.943571][stream.hls][debug] Writing segment 3 to output
[00:00:05.950575][stream.hls][debug] Segment 3 complete
[00:00:06.045578][stream.hls][debug] Writing segment 4 to output
[00:00:06.054578][stream.hls][debug] Segment 4 complete
[00:00:06.129333][stream.hls][debug] Writing segment 5 to output
[00:00:06.134345][stream.hls][debug] Segment 5 complete
[00:00:06.135347][stream.segmented][debug] Closing writer thread
[00:00:06.239350][cli][debug] Writing stream to output
[00:00:06.368548][cli][info] Stream ended
[00:00:06.404553][cli][info] Closing currently open stream...

Can anyone help me with this?

https://ulizaportal.jp/
https://t.pia.jp/streaming

For video platform "ULIZA" operated by the PIA Corporation.
Tickets purchased at "PIA LIVE STREAM" are also used for "ULIZA".
Copy link
Member

@bastimeyer bastimeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, @pzhlkj6612

the second one, however, makes VLC player end immediately.
#EXT-X-ENDLIST

See --player-no-close.

Once the stream has been fully read by Streamlink and the ringbuffer been drained, Streamlink CLI will close the player process and terminate by default. WIth --player-no-close, it'll wait until the player process terminates (e.g. when the user closes it or when it closes on its own).


Regarding the plugin itself, it looks similar to plugins/streamingproviders which are already implemented, so I guess merging it would be ok. Opening a plugin request first before submitting a pull request would be much preferred in the future though, because it avoids situations like this, where the validity of such a plugin needs to be checked after the PR was already submitted.

Comment on lines 52 to 56
schema=validate.Schema(
re.compile(r"""https://vms-api.p.uliza.jp/v1/prog-index.m3u8[^"]+"""),
validate.get(0),
validate.url(),
),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re.Pattern schemas result in either None or re.Match, so the following validate.get() call could be made on a NoneType, which will lead to an AttributeError.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, I forgot validate.none_or_all.

Fixed in 663e5fc . More checks are added as well.


expires = self.match.group("expires")
if expires and int(expires) <= time.time():
raise FatalPluginError("The link is expired")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid / expired input URLs should just return None and log an error message. PluginError and FatalPluginError are reserved for other use cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid / expired input URLs should just return None and log an error message.

So, --retry-streams and --retry-max will retry expired links...? I think it's in vain.

PluginError and FatalPluginError are reserved for other use cases.

OK. The reason I chose FatalPluginError is that it can stop the retry loop.

while not streams:
sleep(interval)
try:
streams = fetch_streams(plugin)
except FatalPluginError:
raise
except PluginError as err:
log.error(err)


Changing FatalPluginError to error messages does not hurt, though.

- Invalid / expired input URLs should just return `None` and log an
  error message. `PluginError` and `FatalPluginError` are reserved for
  other use cases.
- `re.Pattern` schemas result in either `None` or `re.Match`, so the
  following `validate.get()` call could be made on a `NoneType`, which
  will lead to an `AttributeError`.

Co-Authored-By: bastimeyer <mail@bastimeyer.de>
@pzhlkj6612
Copy link
Contributor Author

Thanks for your review, @bastimeyer .


the second one, however, makes VLC player end immediately.
#EXT-X-ENDLIST

See --player-no-close.

...

OK, now I understand.


Regarding the plugin itself, it looks similar to plugins/streamingproviders which are already implemented, so I guess merging it would be ok.

Do you mean "plugins/streamingvideoprovider.py"? I didn't know it before, and I found this plugin has been removed by #3843.
After reading its code, I have a question: do these two plugins look really similar?

... Opening a plugin request first before submitting a pull request would be much preferred in the future though, because it avoids situations like this, where the validity of such a plugin needs to be checked after the PR was already submitted.

Well, I just searched the domain name of that platform, checked "Plugin requests § CONTRIBUTING.md" and then submitted this PR. I made a disallowed plugin several months ago, so I'm being more careful than before.

@pzhlkj6612 pzhlkj6612 requested a review from bastimeyer August 20, 2023 15:47
Copy link
Member

@bastimeyer bastimeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any actual free live streams that can be tested?

Do you mean "plugins/streamingvideoprovider.py"?

No, I was talking about plugins for streaming sites which provide similar services like this one, e.g. UStreamTV and others.


Some further code cleanups:

  • max line length
  • the Referer header with the current URL should be set on the player JS request
  • the order of query string parameters can be arbitrary, so matching expires in the pluginmatcher is not the way to go
diff --git a/src/streamlink/plugins/piaulizaportal.py b/src/streamlink/plugins/piaulizaportal.py
index bdaa7fbe..48640d49 100644
--- a/src/streamlink/plugins/piaulizaportal.py
+++ b/src/streamlink/plugins/piaulizaportal.py
@@ -9,6 +9,7 @@ $notes Tickets purchased at "PIA LIVE STREAM" are used for this platform.
 import logging
 import re
 import time
+from urllib.parse import parse_qsl, urlparse
 
 from streamlink.plugin import Plugin, pluginmatcher
 from streamlink.plugin.api import validate
@@ -18,36 +19,34 @@ from streamlink.stream.hls import HLSStream
 log = logging.getLogger(__name__)
 
 
-@pluginmatcher(
-    re.compile(
-        r"https://ulizaportal\.jp/pages/(?P<id>[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12})(\?expires=(?P<expires>\d+).*)?",
-    ),
-)
+@pluginmatcher(re.compile(
+    r"https://ulizaportal\.jp/pages/(?P<id>[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12})",
+))
 class PIAULIZAPortal(Plugin):
-    def __init__(self, *args, **kwargs):
-        super().__init__(*args, **kwargs)
-        self.session.http.headers.update({"Referer": "https://ulizaportal.jp/"})
+    _URL_PLAYER_DATA = "https://player-api.p.uliza.jp/v1/players/"
+    _URL_PLAYLIST = "https://vms-api.p.uliza.jp/v1/prog-index.m3u8"
 
     def _get_streams(self):
         self.id = self.match.group("id")
 
-        expires = self.match.group("expires")
-        if expires and int(expires) <= time.time():
-            log.error("The link is expired")
+        try:
+            expires = int(dict(parse_qsl(urlparse(self.url).query)).get("expires", 0))
+        except ValueError:
+            expires = 0
+        if 0 < expires <= time.time():
+            log.error("The URL has expired")
             return None
 
         self.title, player_data_url = self.session.http.get(
             self.url,
             schema=validate.Schema(
                 validate.parse_html(),
-                validate.union(
-                    (
-                        validate.xml_xpath_string(".//head/title[1]/text()"),
-                        validate.xml_xpath_string(
-                            ".//script[@type='text/javascript'][contains(@src,'https://player-api.p.uliza.jp/v1/players/')]/@src",
-                        ),
+                validate.union((
+                    validate.xml_xpath_string(".//head/title[1]/text()"),
+                    validate.xml_xpath_string(
+                        f".//script[@type='text/javascript'][contains(@src,'{self._URL_PLAYER_DATA}')][1]/@src",
                     ),
-                ),
+                )),
             ),
         )
         if not player_data_url:
@@ -56,8 +55,11 @@ class PIAULIZAPortal(Plugin):
 
         m3u8_url = self.session.http.get(
             player_data_url,
+            headers={
+                "Referer": self.url,
+            },
             schema=validate.Schema(
-                re.compile(r"""https://vms-api.p.uliza.jp/v1/prog-index.m3u8[^"]+"""),
+                re.compile(rf"""{re.escape(self._URL_PLAYLIST)}[^"']+"""),
                 validate.none_or_all(
                     validate.get(0),
                     validate.url(),
diff --git a/tests/plugins/test_piaulizaportal.py b/tests/plugins/test_piaulizaportal.py
index 6f9b6293..dd084910 100644
--- a/tests/plugins/test_piaulizaportal.py
+++ b/tests/plugins/test_piaulizaportal.py
@@ -5,7 +5,19 @@ from tests.plugins import PluginCanHandleUrl
 class TestPluginCanHandleUrlPIAULIZAPortal(PluginCanHandleUrl):
     __plugin__ = PIAULIZAPortal
 
-    should_match = [
-        "https://ulizaportal.jp/pages/005f18b7-e810-5618-cb82-0987c5755d44",
-        "https://ulizaportal.jp/pages/005e1b23-fe93-5780-19a0-98e917cc4b7d?expires=4102412400&signature=f422a993b683e1068f946caf406d211c17d1ef17da8bef3df4a519502155aa91&version=1",
+    should_match_groups = [
+        (
+            "https://ulizaportal.jp/pages/005f18b7-e810-5618-cb82-0987c5755d44",
+            {"id": "005f18b7-e810-5618-cb82-0987c5755d44"},
+        ),
+        (
+            "https://ulizaportal.jp/pages/005e1b23-fe93-5780-19a0-98e917cc4b7d"
+            + "?expires=4102412400&signature=f422a993b683e1068f946caf406d211c17d1ef17da8bef3df4a519502155aa91&version=1",
+            {"id": "005e1b23-fe93-5780-19a0-98e917cc4b7d"},
+        ),
+    ]
+
+    should_not_match = [
+        "https://ulizaportal.jp/pages/",
+        "https://ulizaportal.jp/pages/invalid-id",
     ]

- max line length
- the `Referer` header with the current URL should be set on the player
  JS request
- the order of query string parameters can be arbitrary, so matching
  `expires` in the pluginmatcher is not the way to go

Co-Authored-By: bastimeyer <mail@bastimeyer.de>
@pzhlkj6612
Copy link
Contributor Author

Do you mean "plugins/streamingvideoprovider.py"?

No, I was talking about plugins for streaming sites which provide similar services like this one, e.g. UStreamTV and others.

OK.


Some further code cleanups:

  • max line length
  • ... (in the diff)

It seems that our linter (ruff) does not conform to the code style, or there are some gaps in the configuration?


Are there any actual free live streams that can be tested?

I searched but cannot find any free live streams.

Here I'm providing some info about a real event. The "Save All Resources" Chrome extension helped me download it:

downloaded info

Player data

Before live stream starts:

{"src":{"video":"https://uliza-cover-images.p.uliza.jp/.../....png"

live streams and archives available for viewing during the day of the live stream:

{"src":{"video":"https://vms-api.p.uliza.jp/v1/prog-index.m3u8?expires=...&signature=...&ss=...&version=1&live=true"

Tomorrow's archives:

{"src":{"video":"https://vms-api.p.uliza.jp/v1/prog-index.m3u8?expires=...&signature=...&ss=...&version=1"

Note: the player data is not always valid JavaScript. プレゼンテーションプレイヤーのサンプル gives me this:

...{"authDomain":[]}}},
src: {"video":"https://vms-api.p.uliza.jp/v1/prog-index.m3u8?expires=...&signature=...&ss=...&version=1"...

M3U8 playlists

Live streams:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=4000000
https://<string_1>.cloudfront.net/hls/video/ipblite\d{2}/<numbers_1>_livestream<numbers_2>_4000/chunklist.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2000000
https://<string_1>.cloudfront.net/hls/video/ipblite\d{2}/<numbers_1>_livestream<numbers_2>_2000/chunklist.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1000000
https://<string_1>.cloudfront.net/hls/video/ipblite\d{2}/<numbers_1>_livestream<numbers_2>_1000/chunklist.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=4000000
https://<string_2>.cloudfront.net/hls/video/ipblite\d{2}/<numbers_1>_livestream<numbers_2>_4000/chunklist.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2000000
https://<string_2>.cloudfront.net/hls/video/ipblite\d{2}/<numbers_1>_livestream<numbers_2>_2000/chunklist.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1000000
https://<string_2>.cloudfront.net/hls/video/ipblite\d{2}/<numbers_1>_livestream<numbers_2>_1000/chunklist.m3u8

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:5
#EXT-X-MEDIA-SEQUENCE:****
#EXT-X-KEY:METHOD=AES-128,URI="/hls/key/ipblite/key.php"
#EXTINF:4.004,
media-\w{9,}_****.ts
#...

Archives available for viewing during the day of the live stream:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=4000000
https://<string_1>.cloudfront.net/hls/dvr/ipblite\d{2}/<numbers_1>_livestream<numbers_2>_4000/chunklist_DVR.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2000000
https://<string_1>.cloudfront.net/hls/dvr/ipblite\d{2}/<numbers_1>_livestream<numbers_2>_2000/chunklist_DVR.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1000000
https://<string_1>.cloudfront.net/hls/dvr/ipblite\d{2}/<numbers_1>_livestream<numbers_2>_1000/chunklist_DVR.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=4000000
https://<string_2>.cloudfront.net/hls/dvr/ipblite\d{2}/<numbers_1>_livestream<numbers_2>_4000/chunklist_DVR.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2000000
https://<string_2>.cloudfront.net/hls/dvr/ipblite\d{2}/<numbers_1>_livestream<numbers_2>_2000/chunklist_DVR.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1000000
https://<string_2>.cloudfront.net/hls/dvr/ipblite\d{2}/<numbers_1>_livestream<numbers_2>_1000/chunklist_DVR.m3u8

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:11
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-KEY:METHOD=AES-128,URI="/hls/key/ipblite/key.php?{encKeySessionid}"
#EXTINF:10.01,
../../../video/ipblite\d{2}/<numbers_1>_livestream<numbers_2>_4000/media-\w{9,}_DVR_0.ts
#...

Tomorrow's archives:

#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=4600000
https://<string_3>.cloudfront.net/<numbers_1>/<YYYYmmddHHMMSS>_[a-z\d]{64}_1.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2300000
https://<string_3>.cloudfront.net/<numbers_1>/<YYYYmmddHHMMSS>_[a-z\d]{64}_2.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1200000
https://<string_3>.cloudfront.net/<numbers_1>/<YYYYmmddHHMMSS>_[a-z\d]{64}_3.m3u8

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:11
#EXT-X-KEY:METHOD=AES-128,URI="https://vms-api.p.uliza.jp/v1/keys?st=...&s=0"
#EXTINF:10.033333,
<YYYYmmddHHMMSS>_[a-z\d]{64}_1/mediafile_0.ts
#...

EOF

@pzhlkj6612 pzhlkj6612 requested a review from bastimeyer August 21, 2023 15:39
@bastimeyer
Copy link
Member

It seems that our linter (ruff) does not conform to the code style, or there are some gaps in the configuration?

No, ruff ignores lines with single "words" without whitespace which exceed the max line length.
https://beta.ruff.rs/docs/rules/line-too-long/

@bastimeyer bastimeyer merged commit 9d5e2bf into streamlink:master Aug 21, 2023
@pzhlkj6612 pzhlkj6612 deleted the pia-ulizaportal-jp branch August 22, 2023 03:56


@pluginmatcher(re.compile(
r"https://ulizaportal\.jp/pages/(?P<id>[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12})",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
r"https://ulizaportal\.jp/pages/(?P<id>[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12})",
r"https?://ulizaportal\.jp/pages/(?P<id>[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12})",

Hi, @bastimeyer , could you please help me make the RegEx a little more generic by committing a quick fix?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's necessary. https:// is applied to scheme-less input URLs automatically. The plugin expects URLs to be copied by users with the provided UUIDs (nobody will manually type the UUID), so unless stream URLs get shared with http:// schemes explicitly (which I don't think they will), this is not needed. Apart from that, nobody can push to master directly, so another PR would be needed anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's necessary. ...

OK, I agree.
I found that almost all pluginmatchers match both "http" and "https", so I was wondering if I forgot to do so to comply with any rules.

Apart from that, nobody can push to master directly, so another PR would be needed anyway.

Got it. It's necessary protection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants