Commit b31e729 1 parent 088a52b commit b31e729 Copy full SHA for b31e729
File tree 2 files changed +9
-32
lines changed
2 files changed +9
-32
lines changed Original file line number Diff line number Diff line change 39
39
from .errors import (
40
40
URLNotProvided ,
41
41
SiteNotSupported ,
42
- LoginRequired ,
43
- VideoUnavailable ,
44
- NoChatReplay ,
45
- VideoUnplayable ,
46
- InvalidParameter ,
47
42
InvalidURL ,
48
- RetriesExceeded ,
49
- NoContinuation ,
50
- UserNotFound ,
43
+ ChatDownloaderError ,
51
44
ChatGeneratorError ,
52
45
ParsingError ,
53
- SiteError ,
54
- NoVideos ,
55
- FormatError
56
46
)
57
47
58
48
@@ -397,29 +387,15 @@ def callback(item):
397
387
log ('info' , 'Finished retrieving chat{}.' .format (
398
388
'' if chat .is_live else ' replay' ))
399
389
400
- except (
401
- URLNotProvided ,
402
- SiteNotSupported ,
403
- LoginRequired ,
404
- VideoUnavailable ,
405
- NoChatReplay ,
406
- VideoUnplayable ,
407
- InvalidParameter ,
408
- InvalidURL ,
409
- RetriesExceeded ,
410
- NoContinuation ,
411
- UserNotFound ,
412
- SiteError ,
413
- NoVideos ,
414
- FormatError
415
- ) as e : # Expected errors
416
- log ('error' , e )
417
390
except (
418
391
ChatGeneratorError ,
419
392
ParsingError
420
393
) as e : # Errors which may be bugs
421
394
log ('error' , '{}. Please report this at https://github.com/xenova/chat-downloader/issues/new/choose' .format (e ))
422
395
396
+ except ChatDownloaderError as e : # Expected errors
397
+ log ('error' , e )
398
+
423
399
except ConnectionError as e :
424
400
log ('error' , 'Unable to establish a connection. Please check your internet connection. {}' .format (e ))
425
401
Original file line number Diff line number Diff line change @@ -82,13 +82,13 @@ class ChatGeneratorError(ChatDownloaderError):
82
82
pass
83
83
84
84
85
- class SiteNotSupported (ChatDownloaderError ):
86
- """Raised when the url is valid, but the site is not supported ."""
85
+ class SiteError (ChatDownloaderError ):
86
+ """Raised when an error occurs with a specific site."""
87
87
pass
88
88
89
89
90
- class SiteError ( ChatDownloaderError ):
91
- """Raised when an error occurs with a specific site."""
90
+ class SiteNotSupported ( SiteError ):
91
+ """Raised when the url is valid, but the site is not supported ."""
92
92
pass
93
93
94
94
@@ -111,6 +111,7 @@ class FormatNotFound(FormatError):
111
111
"""Raised when a specified format can not be found"""
112
112
pass
113
113
114
+
114
115
class FormatFileNotFound (FormatError ):
115
116
"""Raised when the format file can not be found"""
116
117
pass
You can’t perform that action at this time.
0 commit comments