Skip to content
This repository was archived by the owner on Jun 30, 2022. It is now read-only.

Commit

Permalink
👌 Fixed descriptionSnippet in VideoSearch & async StreamURLFetcher
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmercerind committed Apr 21, 2021
1 parent ff68f0d commit 8467eb8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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']),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion youtubesearchpython/handlers/componenthandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']),
Expand Down

0 comments on commit 8467eb8

Please sign in to comment.