Investigate and silence warnings. (#1133)
This commit is contained in:
@@ -13,6 +13,11 @@ try:
|
|||||||
warnings.filterwarnings(
|
warnings.filterwarnings(
|
||||||
"ignore", category=DeprecationWarning, module="speech_recognition"
|
"ignore", category=DeprecationWarning, module="speech_recognition"
|
||||||
)
|
)
|
||||||
|
warnings.filterwarnings(
|
||||||
|
"ignore",
|
||||||
|
category=SyntaxWarning,
|
||||||
|
module="pydub", # TODO: Migrate away from pydub
|
||||||
|
)
|
||||||
import speech_recognition as sr
|
import speech_recognition as sr
|
||||||
|
|
||||||
import pydub
|
import pydub
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import time
|
|||||||
import io
|
import io
|
||||||
import re
|
import re
|
||||||
import bs4
|
import bs4
|
||||||
|
import warnings
|
||||||
from typing import Any, BinaryIO, Optional, Dict, List, Union
|
from typing import Any, BinaryIO, Optional, Dict, List, Union
|
||||||
from urllib.parse import parse_qs, urlparse, unquote
|
from urllib.parse import parse_qs, urlparse, unquote
|
||||||
|
|
||||||
@@ -13,6 +14,11 @@ from ._markdownify import _CustomMarkdownify
|
|||||||
|
|
||||||
# Optional YouTube transcription support
|
# Optional YouTube transcription support
|
||||||
try:
|
try:
|
||||||
|
warnings.filterwarnings(
|
||||||
|
"ignore",
|
||||||
|
category=SyntaxWarning,
|
||||||
|
module="youtube_transcript_api", # Patch submitted to youtube-transcript-api
|
||||||
|
)
|
||||||
from youtube_transcript_api import YouTubeTranscriptApi
|
from youtube_transcript_api import YouTubeTranscriptApi
|
||||||
|
|
||||||
IS_YOUTUBE_TRANSCRIPT_CAPABLE = True
|
IS_YOUTUBE_TRANSCRIPT_CAPABLE = True
|
||||||
|
|||||||
Reference in New Issue
Block a user