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. "915029a65735eefb8dbf4600d29007716e0a7f29" and "7891a616169fa6c665fb1ef19d8b1b7f6a616dcc" have entirely different histories.
915029a657
...
7891a61616
|
@ -3,11 +3,11 @@ import re
|
|||
from .common import InfoExtractor
|
||||
from .archiveorg import ArchiveOrgIE
|
||||
from ..utils import (
|
||||
InAdvancePagedList,
|
||||
int_or_none,
|
||||
orderedSet,
|
||||
str_to_int,
|
||||
orderedSet,
|
||||
urljoin,
|
||||
InAdvancePagedList,
|
||||
)
|
||||
|
||||
|
||||
|
@ -39,21 +39,14 @@ class AltCensoredIE(InfoExtractor):
|
|||
def _real_extract(self, url):
|
||||
video_id = self._match_id(url)
|
||||
webpage = self._download_webpage(url, video_id)
|
||||
yt_views = str_to_int(self._html_search_regex(r'YouTube Views:(?:\s| )*([\d,]+)', webpage, 'view count', default=''))
|
||||
category = self._html_search_regex(r'<a href="/category/\d+">\s*\n?\s*([^<]+)</a>', webpage, 'category', fatal=False)
|
||||
|
||||
return {
|
||||
'_type': 'url_transparent',
|
||||
'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))
|
||||
'categories': self._html_search_regex(
|
||||
r'<a href="/category/\d+">\s*\n?\s*([^<]+)</a>',
|
||||
webpage, 'category', default='').split() or None
|
||||
}
|
||||
return self.url_result(f'https://archive.org/details/youtube-{video_id}', ArchiveOrgIE, url_transparent=True,
|
||||
view_count=yt_views, categories=[category])
|
||||
|
||||
|
||||
class AltCensoredChannelIE(InfoExtractor):
|
||||
IE_NAME = 'altcensored:channel'
|
||||
_VALID_URL = r'https?://(?:www\.)?altcensored\.com/channel/(?!page|table)(?P<id>[^/?#]+)'
|
||||
_PAGE_SIZE = 24
|
||||
_TESTS = [{
|
||||
|
|
Loading…
Reference in New Issue
Block a user