aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhwgh1968 <jhwgh1968@protonmail.com>2021-08-15 06:02:11 +0000
committerGitHub <noreply@github.com>2021-08-15 11:32:11 +0530
commitd967c68e4ce83d48f50d97710123bb4ed8f95d1b (patch)
tree9734e3ee2d11a316a87605d44497e85572de2420
parent3dd39c5f9a55b8169cf35bc2b33a08842b3c40fe (diff)
downloadhypervideo-pre-d967c68e4ce83d48f50d97710123bb4ed8f95d1b.tar.lz
hypervideo-pre-d967c68e4ce83d48f50d97710123bb4ed8f95d1b.tar.xz
hypervideo-pre-d967c68e4ce83d48f50d97710123bb4ed8f95d1b.zip
[eroprofile] Fix page skipping in albums (#701)
Bug from #658 Authored by: jhwgh1968
-rw-r--r--yt_dlp/extractor/eroprofile.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/yt_dlp/extractor/eroprofile.py b/yt_dlp/extractor/eroprofile.py
index 54ed9a49e..a8396f1d3 100644
--- a/yt_dlp/extractor/eroprofile.py
+++ b/yt_dlp/extractor/eroprofile.py
@@ -114,11 +114,13 @@ class EroProfileAlbumIE(InfoExtractor):
yield from self._extract_from_page(first_page)
page_urls = re.findall(rf'href=".*?(/m/videos/album/{playlist_id}\?pnum=(\d+))"', first_page)
+ max_page = max(int(n) for _, n in page_urls)
- for url, n in page_urls[1:]:
- yield from self._extract_from_page(self._download_webpage(
- f'https://www.eroprofile.com{url}',
- playlist_id, note=f'Downloading playlist page {int(n) - 1}'))
+ for n in range(2, max_page + 1):
+ url = f'https://www.eroprofile.com/m/videos/album/{playlist_id}?pnum={n}'
+ yield from self._extract_from_page(
+ self._download_webpage(url, playlist_id,
+ note=f'Downloading playlist page {int(n) - 1}'))
def _real_extract(self, url):
playlist_id = self._match_id(url)