-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
plugins.onetv: split plugin #3743
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just commenting on the code, not the actual implementation, as it's geo-blocked and I don't have access.
_re_url_1 = re.compile(r'https?://(?P<channel>ctc(?:love)?|chetv|domashniy|5-tv)\.ru/(?:online|live)') | ||
_re_url_2 = re.compile(r'https?://(?P<channel>ren)\.tv/live') | ||
_re_url_3 = re.compile(r'https?://player\.mediavitrina\.ru/(?P<channel>[^/?]+.)(?:/[^/]+)?/[\w_]+/player\.html') | ||
|
||
@classmethod | ||
def can_handle_url(cls, url): | ||
return ( | ||
cls._re_url_1.match(url) is not None | ||
or cls._re_url_2.match(url) is not None | ||
or cls._re_url_3.match(url) is not None | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this should be changed to a single regex.
If we ever switch the plugin matching system and load plugins on demand with a list of regexes extracted from the plugin modules during build time, then we need to implement a system that can take multiple regexes into account for a single plugin. There are only a handful of plugins currently (5 or so) that use "extended" logic in the can_handle_url
method.
Shouldn't be too much of an issue though, so feel free to ignore.
- remove broken VOD support - remove other domains which use API V2, 1TV uses API V1
- re-added removed domains from onetv plugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good now, hence the approval. Can't test the sites though due to geolocking
- remove broken VOD support - remove other domains which use API V2, 1TV uses API V1
- re-added removed domains from onetv plugin
plugins.onetv
plugins.mediavitrina
closes #3587
closes #3669