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

Fixtests #7718

Merged
merged 72 commits into from Oct 6, 2023
Merged

Fixtests #7718

merged 72 commits into from Oct 6, 2023

Conversation

trainman261
Copy link
Contributor

@trainman261 trainman261 commented Jul 28, 2023

IMPORTANT: PRs without the template will be CLOSED

Description of your pull request and other information

Fixing tests as discussed in #7484 .
As many as possible were fixed. Despite this, many tests don't work for different reasons, in many cases the videos are no longer available, possibly geo-restricted, sometimes it's hard to tell. Those tests have all been marked with a skip. The tests, where the IE itself seems to be broken, have not been marked with a skip. This means a lot of tests are marked with a skip, though. Wherever I was able to find an alternative video, I did, but I wasn't often able to. If I should get rid of the skip tags, please let me know.
The fixes for the individual IEs have been also maintained in seperate branches and can be pulled separately if required (branches are named name-fixtests).
The following IE tests now all pass (or skip):

  • AE networks (all IEs)
  • AMC networks
  • CBC: CBC Player, CBC Gem, CBC Gem Live, CBC Gem Playlist
  • CBS (all IEs)
  • CNBC: CNBC, CNBC Video
  • CWTV
  • Mediaset (all IEs)
  • MovieClips
  • National Geographic (all IEs)
  • NBC: NBC News, NBC Olympics, NBC Olympics Stream, NBC Stations
  • Scripps Networks (all IEs)
  • Sprout
  • Syfy
  • ThePlatform
  • generic, up to and including 17 (going further just got too much for now, maybe I'll come back to this some other time). To fix 18 would need changes in the base, since there are a number of fields the tests expect that just change way too often, such as views and subscriber counts.

The following IEs seem to be broken:

  • Corus
  • NBCSports
  • CBC

NBCSportsVPlayer seems to not work with CPython 3.7, but works with CPython 3.8 and PyPy.

Fixes #

Template

Before submitting a pull request make sure you have:

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:

  • 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?

Copilot Summary

🤖 Generated by Copilot at 65019f5

Summary

🛠️🌎🚫

This pull request updates and fixes the tests for various extractors, adding or changing keys in the test dictionaries to reflect the current status and metadata of the test URLs. It also skips some tests that fail due to geo-restriction, unavailability, or redirection of the test URLs. The affected extractors include aenetworks.py, cbc.py, cbs.py, cnbc.py, corus.py, generic.py, mediaset.py, nationalgeographic.py, nbc.py, scrippsnetworks.py, theplatform.py, amcnetworks.py, cwtv.py, movieclips.py, sprout.py, syfy.py, and theweatherchannel.py.

We're testing the extractors, one by one
We're skipping the broken ones, 'til they're done
We're adding the keys and the hashes, with care
We're heaving away, on the count of three, youtube-dl!

Walkthrough

trainman261 and others added 30 commits June 27, 2023 22:05
…umentation and don't work anymore. Someone who knows their way around these sites that use theplatform should fix this, so that proper regression testing can be done for theplatform.
…because I also don't have access to BBCAmerica.
… the extractor is broken as well. Someone in the appropriate geographic region (I'm assuming US) should test this.
…ust not realistic (things like subscriber counts). This will have to be fixed in the base code first before I can continue here.
@bashonly bashonly added the docs/meta/cleanup related to docs, code cleanup, templates, devscripts etc label Jul 29, 2023
@bashonly bashonly added the pending-fixes PR has had changes requested label Sep 21, 2023
yt_dlp/extractor/aenetworks.py Outdated Show resolved Hide resolved
yt_dlp/extractor/aenetworks.py Outdated Show resolved Hide resolved
yt_dlp/extractor/aenetworks.py Outdated Show resolved Hide resolved
yt_dlp/extractor/aenetworks.py Outdated Show resolved Hide resolved
yt_dlp/extractor/amcnetworks.py Outdated Show resolved Hide resolved
yt_dlp/extractor/sprout.py Outdated Show resolved Hide resolved
yt_dlp/extractor/syfy.py Outdated Show resolved Hide resolved
yt_dlp/extractor/theplatform.py Outdated Show resolved Hide resolved
yt_dlp/extractor/theplatform.py Outdated Show resolved Hide resolved
yt_dlp/extractor/theplatform.py Outdated Show resolved Hide resolved
trainman261 and others added 16 commits September 29, 2023 21:44
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
@bashonly
Copy link
Member

Heads up, there are some more review suggestions in the "hidden conversations" -- I'd recommend going to the "Files changed" tab and adding them to a batch commit

Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
@trainman261
Copy link
Contributor Author

Thanks for the heads up, added that. Anything else?

@bashonly bashonly removed the pending-fixes PR has had changes requested label Sep 29, 2023
Copy link
Member

@bashonly bashonly left a comment

Choose a reason for hiding this comment

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

LGTM

@gamer191
Copy link
Collaborator

gamer191 commented Sep 30, 2023

  • To fix 18 would need changes in the base, since there are a number of fields the tests expect that just change way too often, such as views and subscriber counts.

You can just do:

'channel_follower_count': int,
'comment_count': int,
'like_count': int,
'view_count': int,

but I think this PR is big enough as is, and it's already been reviewed by bashonly, so lets save that for a future PR

PS: I posted a review comment on one of the above threads, in case you didn't see it

@bashonly bashonly merged commit 19c90e4 into yt-dlp:master Oct 6, 2023
16 checks passed
aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this pull request Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs/meta/cleanup related to docs, code cleanup, templates, devscripts etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants