Это мой сценарий, сохраненный по адресу:
Код: Выделить всё
/usr/lib/python3/dist-packages/yt_dlp/extractor/buzz.py
Код: Выделить всё
from yt_dlp.extractor.common import InfoExtractor
import re
class BuzzSproutIE(InfoExtractor):
IE_NAME = 'buzzsprout'
_VALID_URL = r'https://www.buzzsprout.com/.*/(?P[^/?#&]+)$'
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
# Extract the season number.
season = self._search_regex(
r'Season (\d+)',
webpage,
'season',
fatal=False
)
# Extract the episode number.
episode = self._search_regex(
r'Episode (\d+)',
webpage,
'episode',
fatal=False
)
return {
'id': video_id,
'title': self._html_search_regex(r'([^
Подробнее здесь: [url]https://stackoverflow.com/questions/79290667/how-to-add-custom-extractor-to-yt-dlp[/url]