Compare commits

..

No commits in common. "9ea2a132eb75c0ee2b272b86f784a720559d58ef" and "915029a65735eefb8dbf4600d29007716e0a7f29" have entirely different histories.

View File

@ -1,7 +1,7 @@
import re import re
from .archiveorg import ArchiveOrgIE
from .common import InfoExtractor from .common import InfoExtractor
from .archiveorg import ArchiveOrgIE
from ..utils import ( from ..utils import (
InAdvancePagedList, InAdvancePagedList,
int_or_none, int_or_none,
@ -45,10 +45,10 @@ class AltCensoredIE(InfoExtractor):
'url': f'https://archive.org/details/youtube-{video_id}', 'url': f'https://archive.org/details/youtube-{video_id}',
'ie_key': ArchiveOrgIE.ie_key(), 'ie_key': ArchiveOrgIE.ie_key(),
'view_count': str_to_int(self._html_search_regex( '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( 'categories': self._html_search_regex(
r'<a href="/category/\d+">\s*\n?\s*([^<]+)</a>', 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): def _real_extract(self, url):
channel_id = self._match_id(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) title = self._html_search_meta('altcen_title', webpage, 'title', fatal=False)
page_count = int_or_none(self._html_search_regex( page_count = int_or_none(self._html_search_regex(
r'<a[^>]+href="/channel/\w+/page/(\d+)">(?:\1)</a>', r'<a[^>]+href="/channel/\w+/page/(\d+)">(?:\1)</a>', webpage, 'page count', default='1'))
webpage, 'page count', default='1'))
def page_func(page_num): def page_func(page_num):
page_num += 1 page_num += 1