-
Notifications
You must be signed in to change notification settings - Fork 10k
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
[Tvnow] bugfix & download whole serie #15837
Conversation
youtube_dl/extractor/tvnow.py
Outdated
@@ -178,7 +178,47 @@ def _real_extract(self, url): | |||
if not seo_url: | |||
continue | |||
entries.append(self.url_result( | |||
base_url + seo_url + '/player', 'TVNow', info.get('id'))) | |||
base_url + seo_url + '/player', 'TVNow', compat_str(info.get('id')))) |
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.
Won't work on None
.
youtube_dl/extractor/tvnow.py
Outdated
|
||
|
||
class TVNowListChannelIE(TVNowBaseIE): | ||
_VALID_URL = r'(?P<base_url>https?://(?:www\.)?tvnow\.(?:de|at|ch)/(?:rtl(?:2|plus)?|nitro|superrtl|ntv|vox)/(?P<show_id>[^/]+))$' |
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.
No trailing $
. Override suitable
.
youtube_dl/extractor/tvnow.py
Outdated
base_url + "/list/" + season_url, 'TVNowList', compat_str(season_info.get('id')), season_info.get('headline'))) | ||
|
||
return self.playlist_result( | ||
entries, compat_str(list_info['id']), compat_str(list_info['title'] or show_id)) |
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.
Playlist metadata must not be fatal.
youtube_dl/extractor/tvnow.py
Outdated
'formats/seo', show_id, query={ | ||
'fields': ','.join(fields), | ||
'name': show_id + '.php' | ||
}) |
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 duplication.
youtube_dl/extractor/tvnow.py
Outdated
|
||
fields = [] | ||
fields.extend(self._SHOW_FIELDS) | ||
fields.extend('formatTabs.%s' % field for field in self._SEASON_FIELDS) |
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 duplication.
hope now it's like you want it |
youtube_dl/extractor/tvnow.py
Outdated
@@ -178,7 +186,40 @@ def _real_extract(self, url): | |||
if not seo_url: | |||
continue | |||
entries.append(self.url_result( | |||
base_url + seo_url + '/player', 'TVNow', info.get('id'))) | |||
base_url + seo_url + '/player', 'TVNow', str(info.get('id')))) |
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.
Nothing changed.
youtube_dl/extractor/tvnow.py
Outdated
|
||
|
||
class TVNowListChannelIE(TVNowBaseIE): | ||
_VALID_URL = r'(?P<base_url>https?://(?:www\.)?tvnow\.(?:de|at|ch)/(?:rtl(?:2|plus)?|nitro|superrtl|ntv|vox)/(?P<show_id>[^/]+)$)' |
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.
I've already pointed out: no trailing $
. Override suitable
instead.
youtube_dl/extractor/tvnow.py
Outdated
'fields': ','.join(fields), | ||
'name': show_id + '.php' | ||
}) | ||
fields = self._extend_query(self._SHOW_FIELDS, self._SEASON_FIELDS, self._VIDEO_FIELDS) |
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 duplication 173, 213. There is no sense to extract fields explicitly.
|
||
return fields | ||
|
||
def _tvnow_list_info(self, list_id, show_id, fields): |
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.
This is not used in single video extractor thus should not be here.
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.
that is fixed
youtube_dl/extractor/tvnow.py
Outdated
base_url + "/list/" + season_url, 'TVNowList', compat_str(season_info.get('id')), season_info.get('headline'))) | ||
|
||
return self.playlist_result( | ||
entries, list_info['id'], list_info['title']) |
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.
Playlist id and title should not be fatal.
anything else? |
entries.append(self.url_result( | ||
base_url + seo_url + '/player', 'TVNow', info.get('id'))) | ||
base_url + seo_url + '/player', 'TVNow', str(info.get('id', seo_url)))) |
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.
One question: do you even read my posts?
Please follow the guide below
x
into all the boxes [ ] relevant to your pull request (like that [x])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:
What is the purpose of your pull request?
Description of your pull request and other information
Explanation of your pull request in arbitrary form goes here. Please make sure the description explains the purpose and effect of your pull request and is worded well enough to be understood. Provide as much context and examples as possible.
with this pull request you can download a whole serie