Skip to content

Commit

Permalink
Added new EmptyDataError exception
Browse files Browse the repository at this point in the history
  • Loading branch information
henrique-coder committed Nov 5, 2024
1 parent 5181d72 commit b6cb676
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion streamsnapper/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Local imports
from .streamsnapper import YouTube, SoundCloud, Downloader, Merger
from .exceptions import StreamBaseError, InvalidDataError, ScrapingError, DownloadError, MergeError
from .exceptions import StreamBaseError, EmptyDataError, InvalidDataError, ScrapingError, DownloadError, MergeError


__version__ = '0.1.1'
Expand Down
10 changes: 8 additions & 2 deletions streamsnapper/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@ class StreamBaseError(Exception):
pass


class EmptyDataError(StreamBaseError):
"""Exception raised when no data is available."""

pass


class InvalidDataError(StreamBaseError):
"""Exception raised when invalid yt-dlp data is provided."""
"""Exception raised when invalid data is provided."""

pass


class ScrapingError(StreamBaseError):
"""Exception raised when an error occurs while scraping YouTube data."""
"""Exception raised when an error occurs while scraping data."""

pass

Expand Down

0 comments on commit b6cb676

Please sign in to comment.