mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-07 16:01:27 +01:00
Compare commits
No commits in common. "9ea2a132eb75c0ee2b272b86f784a720559d58ef" and "915029a65735eefb8dbf4600d29007716e0a7f29" have entirely different histories.
9ea2a132eb
...
915029a657
|
@ -1,7 +1,7 @@
|
|||
import re
|
||||
|
||||
from .archiveorg import ArchiveOrgIE
|
||||
from .common import InfoExtractor
|
||||
from .archiveorg import ArchiveOrgIE
|
||||
from ..utils import (
|
||||
InAdvancePagedList,
|
||||
int_or_none,
|
||||
|
@ -45,10 +45,10 @@ class AltCensoredIE(InfoExtractor):
|
|||
'url': f'https://archive.org/details/youtube-{video_id}',
|
||||
'ie_key': ArchiveOrgIE.ie_key(),
|
||||
'view_count': str_to_int(self._html_search_regex(
|
||||
r'YouTube Views:(?:\s| )*([\d,]+)', webpage, 'view count', default=None)),
|
||||
r'YouTube Views:(?:\s| )*([\d,]+)', webpage, 'view count', default=None))
|
||||
'categories': self._html_search_regex(
|
||||
r'<a href="/category/\d+">\s*\n?\s*([^<]+)</a>',
|
||||
webpage, 'category', default='').split() or None,
|
||||
webpage, 'category', default='').split() or None
|
||||
}
|
||||
|
||||
|
||||
|
@ -74,12 +74,12 @@ class AltCensoredChannelIE(InfoExtractor):
|
|||
|
||||
def _real_extract(self, url):
|
||||
channel_id = self._match_id(url)
|
||||
webpage = self._download_webpage(
|
||||
url, channel_id, 'Download channel webpage', 'Unable to get channel webpage')
|
||||
|
||||
webpage = self._download_webpage(url, channel_id, note='Download channel info',
|
||||
errnote='Unable to get channel info')
|
||||
title = self._html_search_meta('altcen_title', webpage, 'title', fatal=False)
|
||||
page_count = int_or_none(self._html_search_regex(
|
||||
r'<a[^>]+href="/channel/\w+/page/(\d+)">(?:\1)</a>',
|
||||
webpage, 'page count', default='1'))
|
||||
r'<a[^>]+href="/channel/\w+/page/(\d+)">(?:\1)</a>', webpage, 'page count', default='1'))
|
||||
|
||||
def page_func(page_num):
|
||||
page_num += 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user