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

expose release_year for tubi #27317

Merged
merged 3 commits into from
Dec 8, 2020
Merged

expose release_year for tubi #27317

merged 3 commits into from
Dec 8, 2020

Conversation

EntranceJew
Copy link
Contributor

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

Puts the release_year into the extractor data for tubi.

it's sitting in the metadata, may as well use it
Copy link
Collaborator

@dstftw dstftw left a comment

Choose a reason for hiding this comment

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

Add a test.

youtube_dl/extractor/tubitv.py Outdated Show resolved Hide resolved
tubi will typically report 0 for the release year on information they do not have year data for (individual videos, typically) so defaulting to 0 shouldn't impact anything since it I haven't seen a case where it was absent in the first place
@@ -93,4 +103,5 @@ def _real_extract(self, url):
'description': video_data.get('description'),
'duration': int_or_none(video_data.get('duration')),
'uploader_id': video_data.get('publisher_id'),
'release_year': int_or_none(video_data.get('year', 0)),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Lack of data is denoted by None not 0.

@dstftw dstftw merged commit 644c3ef into ytdl-org:master Dec 8, 2020
ThirumalaiK pushed a commit to ThirumalaiK/youtube-dl that referenced this pull request Jan 28, 2021
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.

2 participants