youtube: limit search to 1 video result

This commit is contained in:
jkhsjdhjs 2024-06-02 15:31:24 +00:00
parent 586a109a16
commit 3f7d1ae13c

View File

@ -15,7 +15,7 @@ from .utils import date_from_iso
class YouTube(Plugin):
URL = 'https://www.googleapis.com/youtube/v3'
API = '{}/videos?part=snippet,statistics,contentDetails'.format(URL)
SEARCH = '{}/search?part=id'.format(URL)
SEARCH = '{}/search?type=video&maxResults=1&part=id'.format(URL)
RETURN_YOUTUBE_DISLIKE_API = 'https://returnyoutubedislikeapi.com/votes'
def get_video_data(self, video_id: str):