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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[extractor/TwitCasting] fix: Use UserNotLive #7975
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To make --wait-for-video work.
bashonly
added
enhancement
New feature or request
site-bug
Issue with a specific website
labels
Aug 29, 2023
pukkandan
approved these changes
Sep 21, 2023
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.
LGTM. But the core and extractor changes should be merged in separate commits
bashonly
approved these changes
Sep 21, 2023
bashonly
reviewed
Sep 21, 2023
bashonly
reviewed
Sep 21, 2023
aalsuwaidi
pushed a commit
to aalsuwaidi/yt-dlp
that referenced
this pull request
Apr 21, 2024
Authored by: at-wat
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
IMPORTANT: PRs without the template will be CLOSED
Description of your pull request and other information
Running yt-dlp with
--wait-for-video
option for TwitCastingLive URL results an error:This is caused since
class TwitCastingLiveIE
raisesExtractorError
instead ofUserNotLive
when the channel is currently not live.This PR fixes
TwitCastingIE
to raiseUserNotLive
when the channel isn't live.--wait-for-video
option for TwitCasting works with this branch as below:Added a test case to check the raised exception against a dummy TwitCasting account which won't be live.
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:
What is the purpose of your pull request?
Copilot Summary
馃 Generated by Copilot at 48e7bb8
Summary
馃И馃毃馃帴
This pull request enhances the testing and error handling of
test_download
andtwitcasting
modules. It adds support for testing expected exceptions intest_download
and raises a specific exception for non-live streams intwitcasting
.Walkthrough
YoutubeDLError
andUserNotLive
exceptions fromyt_dlp.utils
(link, link)TwitCastingLiveIE
extractor to expectUserNotLive
exception when user is not live (link, link)UserNotLive
exception inTwitCastingLiveIE._real_extract
method whencurrent_live
value is missing from webpage (link)except
blocks and return or re-raise exception accordingly in test function (link, link)