mirror of
https://github.com/microsoft/markitdown.git
synced 2025-06-26 22:00:21 +00:00
Investigate and silence warnings. (#1133)
This commit is contained in:
parent
5c565b7d79
commit
53834fdd24
@ -13,6 +13,11 @@ try:
|
||||
warnings.filterwarnings(
|
||||
"ignore", category=DeprecationWarning, module="speech_recognition"
|
||||
)
|
||||
warnings.filterwarnings(
|
||||
"ignore",
|
||||
category=SyntaxWarning,
|
||||
module="pydub", # TODO: Migrate away from pydub
|
||||
)
|
||||
import speech_recognition as sr
|
||||
|
||||
import pydub
|
||||
|
@ -4,6 +4,7 @@ import time
|
||||
import io
|
||||
import re
|
||||
import bs4
|
||||
import warnings
|
||||
from typing import Any, BinaryIO, Optional, Dict, List, Union
|
||||
from urllib.parse import parse_qs, urlparse, unquote
|
||||
|
||||
@ -13,6 +14,11 @@ from ._markdownify import _CustomMarkdownify
|
||||
|
||||
# Optional YouTube transcription support
|
||||
try:
|
||||
warnings.filterwarnings(
|
||||
"ignore",
|
||||
category=SyntaxWarning,
|
||||
module="youtube_transcript_api", # Patch submitted to youtube-transcript-api
|
||||
)
|
||||
from youtube_transcript_api import YouTubeTranscriptApi
|
||||
|
||||
IS_YOUTUBE_TRANSCRIPT_CAPABLE = True
|
||||
|
Loading…
x
Reference in New Issue
Block a user