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/dropout] Dropout season pagination #7304
Conversation
Try to return a PagedList instead, or atleast a generator. |
Second pass. The |
Changes made, but still the nested exception issue. Is passing |
yt_dlp/extractor/dropout.py
Outdated
webpage = self._download_webpage( | ||
f'{url}?page={page}', season_id, note=f'Downloading page {page}') |
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.
My bad, I was wrong. yt-dlp will catch the error and continue with playlist extraction, but the extractor & tests do fail. Let's do this then:
webpage = self._download_webpage( | |
f'{url}?page={page}', season_id, note=f'Downloading page {page}') | |
webpage = self._download_webpage( | |
f'{url}?page={page}', season_id, note=f'Downloading page {page}', expected_status=400) |
Authored by: OverlordQ
IMPORTANT: PRs without the template will be CLOSED
Description of your pull request and other information
Handles pagination for seasons with more than 24 episodes. Also fixes test cases with accurate episode counts for seasons.
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 b7d9739
Summary
馃搫馃敆馃И
Improved the
DropoutSeasonIE
extractor to handle multiple pages of episodes. Updated the tests and theyt_dlp/extractor/dropout.py
file accordingly.Walkthrough
get_element_by_attribute
function fromutils.py
to use for pagination (link)playlist_count
forDropoutSeasonIE
extractor test cases to reflect current number of episodes for "Dimension 20: Fantasy High" (link, link)DropoutSeasonIE
extractor to cover multi-season series with pagination, such as "Breaking News No Laugh Newsroom" (link)page_num
variable to 1 in_real_extract
method ofDropoutSeasonIE
extractor to keep track of current page number (link)_real_extract
method ofDropoutSeasonIE
extractor usingget_element_by_attribute
,get_elements_by_class
, andurl_result
functions to download and extract all episodes of a paginated series (link)