diff --git a/youtubesearchpython/__future__/handlers/componenthandler.py b/youtubesearchpython/__future__/handlers/componenthandler.py index 7f3c4d1..2bd5f31 100644 --- a/youtubesearchpython/__future__/handlers/componenthandler.py +++ b/youtubesearchpython/__future__/handlers/componenthandler.py @@ -17,7 +17,7 @@ async def _getVideoComponent(self, element: dict, shelfTitle: str = None) -> dic }, 'thumbnails': await self._getValue(video, ['thumbnail', 'thumbnails']), 'richThumbnail': await self._getValue(video, ['richThumbnail', 'movingThumbnailRenderer', 'movingThumbnailDetails', 'thumbnails', 0]), - 'descriptionSnippet': await self._getValue(video, ['descriptionSnippet', 'runs']), + 'descriptionSnippet': await self._getValue(video, ['detailedMetadataSnippets', 0, 'snippetText', 'runs']), 'channel': { 'name': await self._getValue(video, ['ownerText', 'runs', 0, 'text']), 'id': await self._getValue(video, ['ownerText', 'runs', 0, 'navigationEndpoint', 'browseEndpoint', 'browseId']), diff --git a/youtubesearchpython/__future__/internal/streamurlfetcher.py b/youtubesearchpython/__future__/internal/streamurlfetcher.py index 9b5b335..d4d0648 100644 --- a/youtubesearchpython/__future__/internal/streamurlfetcher.py +++ b/youtubesearchpython/__future__/internal/streamurlfetcher.py @@ -4,7 +4,7 @@ import httpx try: from youtubesearchpython.__future__.internal.json import loads - from pytube.__main__ import apply_descrambler, apply_signature + from pytube.extract import apply_descrambler, apply_signature from pytube import YouTube, extract from urllib.parse import parse_qs isPyTubeInstalled = True diff --git a/youtubesearchpython/handlers/componenthandler.py b/youtubesearchpython/handlers/componenthandler.py index 9ab097c..c336196 100644 --- a/youtubesearchpython/handlers/componenthandler.py +++ b/youtubesearchpython/handlers/componenthandler.py @@ -17,7 +17,7 @@ def _getVideoComponent(self, element: dict, shelfTitle: str = None) -> dict: }, 'thumbnails': self._getValue(video, ['thumbnail', 'thumbnails']), 'richThumbnail': self._getValue(video, ['richThumbnail', 'movingThumbnailRenderer', 'movingThumbnailDetails', 'thumbnails', 0]), - 'descriptionSnippet': self._getValue(video, ['descriptionSnippet', 'runs']), + 'descriptionSnippet': self._getValue(video, ['detailedMetadataSnippets', 0, 'snippetText', 'runs']), 'channel': { 'name': self._getValue(video, ['ownerText', 'runs', 0, 'text']), 'id': self._getValue(video, ['ownerText', 'runs', 0, 'navigationEndpoint', 'browseEndpoint', 'browseId']),