|
|
|
@ -3,7 +3,7 @@ from __future__ import annotations
|
|
|
|
|
from datetime import datetime
|
|
|
|
|
import logging
|
|
|
|
|
import re
|
|
|
|
|
from typing import List, Optional, TypedDict
|
|
|
|
|
from typing import List, NewType, Optional, TypedDict
|
|
|
|
|
|
|
|
|
|
from youtubesearchpython import ResultMode, Video
|
|
|
|
|
|
|
|
|
@ -22,6 +22,9 @@ from ..generic import (
|
|
|
|
|
from .base import MediaExtractor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Keyword = NewType("Keyword", str)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class YoutubeDuration(TypedDict):
|
|
|
|
|
secondsText: str
|
|
|
|
|
|
|
|
|
@ -52,7 +55,7 @@ class YoutubeVideoData(TypedDict):
|
|
|
|
|
channel: YoutubeChannelData
|
|
|
|
|
allowRatings: bool
|
|
|
|
|
averageRating: float
|
|
|
|
|
keywords: List[str]
|
|
|
|
|
keywords: List[Keyword]
|
|
|
|
|
isLiveContent: bool
|
|
|
|
|
publishDate: str
|
|
|
|
|
uploadDate: str
|
|
|
|
|