mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 18:41:29 +00:00
[RoosterTeethSeries] Fix for multiple pages (#1642)
Authored by: MinePlayersPE
This commit is contained in:
parent
48e9310660
commit
df03de2c02
|
@ -12,6 +12,7 @@
|
||||||
url_or_none,
|
url_or_none,
|
||||||
urlencode_postdata,
|
urlencode_postdata,
|
||||||
urljoin,
|
urljoin,
|
||||||
|
update_url_query,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -182,6 +183,13 @@ class RoosterTeethSeriesIE(RoosterTeethBaseIE):
|
||||||
'id': 'role-initiative',
|
'id': 'role-initiative',
|
||||||
'title': 'Role Initiative',
|
'title': 'Role Initiative',
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
'url': 'https://roosterteeth.com/series/let-s-play-minecraft?season=9',
|
||||||
|
'playlist_mincount': 50,
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'let-s-play-minecraft-9',
|
||||||
|
'title': 'Let\'s Play Minecraft - Season 9',
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _entries(self, series_id, season_number):
|
def _entries(self, series_id, season_number):
|
||||||
|
@ -192,7 +200,7 @@ def _entries(self, series_id, season_number):
|
||||||
idx = traverse_obj(data, ('attributes', 'number'))
|
idx = traverse_obj(data, ('attributes', 'number'))
|
||||||
if season_number and idx != season_number:
|
if season_number and idx != season_number:
|
||||||
continue
|
continue
|
||||||
season_url = urljoin(self._API_BASE, data['links']['episodes'])
|
season_url = update_url_query(urljoin(self._API_BASE, data['links']['episodes']), {'per_page': 1000})
|
||||||
season = self._download_json(season_url, display_id, f'Downloading season {idx} JSON metadata')['data']
|
season = self._download_json(season_url, display_id, f'Downloading season {idx} JSON metadata')['data']
|
||||||
for episode in season:
|
for episode in season:
|
||||||
yield self.url_result(
|
yield self.url_result(
|
||||||
|
|
Loading…
Reference in a new issue