-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Update kommunetv.py #32931
base: master
Are you sure you want to change the base?
Update kommunetv.py #32931
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,8 @@ | |
|
||
|
||
class KommunetvIE(InfoExtractor): | ||
_VALID_URL = r'https://(\w+).kommunetv.no/archive/(?P<id>\w+)' | ||
_VALID_URL = r'https?://\w+\.kommun(?:etv\.no|\.tv)/(?:archive|live)/(?P<id>\w+)' | ||
|
||
_TEST = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make this _TESTS = [{
...
}] and add tests for the various URL types. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I have considered doing something like that, but I'm unsure how to obtain the MD5 values. Alternatively, I could create a new function specifically for live streams. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The MD5 values may not be critical, especially as the site is sending adaptive formats where the value could vary. Anyhow, just draft a test case with |
||
'url': 'https://oslo.kommunetv.no/archive/921', | ||
'md5': '5f102be308ee759be1e12b63d5da4bbc', | ||
|
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.
Then use the
where
group in the API URL (maybe Stavanger.kommunetv.no/api has diferent data from Oslo.kommunetv.no/api ?). Use thewhat
to generate the correctstreamType
for the API, using._download_json_handle(..., expected_status=404)
for the live case and then chasing down the archive content if the live is gone.