Skip to content

Commit

Permalink
Improve Stacommu _VALID_URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
bashonly committed Nov 10, 2023
1 parent f7dbeb7 commit 43aca56
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions yt_dlp/extractor/stacommu.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def _extract_ppv(self, url):


class StacommuVODIE(StacommuBaseIE):
_VALID_URL = r'https?://www\.stacommu\.jp/videos/episodes/(?P<id>[\da-zA-Z]+)'
_VALID_URL = r'https?://www\.stacommu\.jp/(?:en/)?videos/episodes/(?P<id>[\da-zA-Z]+)'
_TESTS = [{
# not encrypted
'url': 'https://www.stacommu.jp/videos/episodes/aXcVKjHyAENEjard61soZZ',
Expand Down Expand Up @@ -118,6 +118,9 @@ class StacommuVODIE(StacommuBaseIE):
'params': {
'skip_download': 'm3u8',
},
}, {
'url': 'https://www.stacommu.jp/en/videos/episodes/aXcVKjHyAENEjard61soZZ',
'only_matching': True,
}]

_API_PATH = 'videoEpisodes'
Expand All @@ -127,7 +130,7 @@ def _real_extract(self, url):


class StacommuLiveIE(StacommuBaseIE):
_VALID_URL = r'https?://www\.stacommu\.jp/live/(?P<id>[\da-zA-Z]+)'
_VALID_URL = r'https?://www\.stacommu\.jp/(?:en/)?live/(?P<id>[\da-zA-Z]+)'
_TESTS = [{
'url': 'https://www.stacommu.jp/live/d2FJ3zLnndegZJCAEzGM3m',
'info_dict': {
Expand All @@ -146,6 +149,9 @@ class StacommuLiveIE(StacommuBaseIE):
'params': {
'skip_download': 'm3u8',
},
}, {
'url': 'https://www.stacommu.jp/en/live/d2FJ3zLnndegZJCAEzGM3m',
'only_matching': True,
}]

_API_PATH = 'events'
Expand Down

0 comments on commit 43aca56

Please sign in to comment.