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

[youtube] fixed --flat-playlist always showing uploader as none #28045

Closed
wants to merge 5 commits into from

Conversation

PrinceOfPuppers
Copy link

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

running:

youtube-dl --flat-playlist -j YOUTUBE_PLAYLIST_URL

prior to the bugfix would always have "uploader": none in each playlist item. post fix the proper uploader will appear in said field

@adrianheine
Copy link
Contributor

Hey, thanks for your PR! Please prefix your commit message (and PR title) with [youtube] to indicate that it's about the youtube IE.

@PrinceOfPuppers PrinceOfPuppers changed the title fixed --flat-playlist always showing uploader as none [youtube] fixed --flat-playlist always showing uploader as none Feb 3, 2021
@PrinceOfPuppers
Copy link
Author

Hey, thanks for your PR! Please prefix your commit message (and PR title) with [youtube] to indicate that it's about the youtube IE.

woops sorry, updated.

@PrinceOfPuppers
Copy link
Author

PrinceOfPuppers commented Feb 4, 2021

Also got rid of the extra 2 commits i accidentally created when attempting to rename the commit.

@dstftw
Copy link
Collaborator

dstftw commented Feb 15, 2021

Add test.

Comment on lines +70 to +78
def test_youtube_flat_playlist_uploaders(self):
dl = FakeYDL()
dl.params['extract_flat'] = True
ie = YoutubeTabIE(dl)
result = ie.extract('https://www.youtube.com/playlist?list=PL2zzFmCbIz4fshCLrvopue-wDeKQ5ERKO')
self.assertIsPlaylist(result)
for entry in result['entries']:
if entry['title'] not in ('[Deleted video]', '[Private video]'):
self.assertTrue(entry.get('uploader'))
Copy link
Collaborator

@dstftw dstftw Feb 15, 2021

Choose a reason for hiding this comment

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

Test should be added to _TESTS of extractor class. Use one of the youtube-dl's test playlists for testing, e.g. https://www.youtube.com/playlist?list=PL4lCao7KL_QFVb7Iudeipvc2BCavECqzc.

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