Skip to content
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

Better extraction for nrk #25751

Closed
wants to merge 7 commits into from
Closed

Conversation

Roxedus
Copy link
Contributor

@Roxedus Roxedus commented Jun 21, 2020

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])
  • Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

Description of your pull request and other information

This fixes two open issues for the NRK extractor, #25594 and #24221 as well as providing alt_title, useful for shows that does indeed have unique episode names, rather than <series name> <episode number>:<total episodes in season>

In order to fully fix 24221 I had to use a additional endpoint to fetch a m3u8 playlist, this seems to be the endpoint which exposes 1080P quality.

Some test maintenance was also done, the description seems to change from time to time.

Get content of meta tag
Inspired by, and closes #25594
Can't see why the original method don't work for some streams.
Bonus: provides 1080p quality
Closes #24221
This is what I consider the actual title
Prevents some long-running series from returning `NA`
@Roxedus Roxedus changed the title Better extract nrk Better extraction for nrk Jun 21, 2020
It does not need to be in the loop, introduces some duplicated parts of code
youtube_dl/extractor/nrk.py Outdated Show resolved Hide resolved

dur = parse_duration(playback_convia.get('duration'))
subs = {}
for sub_title in playback_manifest.get('playable').get('subtitles'):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ditto.

youtube_dl/extractor/nrk.py Outdated Show resolved Hide resolved
@@ -427,7 +464,8 @@ def _real_extract(self, url):

nrk_id = self._parse_json(
self._search_regex(JSON_LD_RE, webpage, 'JSON-LD', group='json_ld'),
display_id)['@id']
display_id).get('@id') or \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Breaks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because of the lack of fallback?

@Roxedus
Copy link
Contributor Author

Roxedus commented Jul 21, 2020

making them appear as playlists
They always were marked as playlist, the "duplication" is probably because it pulls from two sources

@dstftw dstftw force-pushed the master branch 2 times, most recently from 5e26784 to da2069f Compare September 13, 2020 13:50
@Roxedus Roxedus closed this Dec 25, 2020
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.

3 participants