mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-22 04:54:16 +00:00
Align `utils.bug_reports_message()` with yt-dlp https://github.com/yt-dlp/yt-dlp/commit/5873d4ccdd, thanks fstirlitz --------- Co-authored-by: dirkf <fieldhouse@gmx.net>
This commit is contained in:
parent
21792b88b7
commit
4ea59c6107
@ -2371,15 +2371,24 @@ def make_HTTPS_handler(params, **kwargs):
|
|||||||
return YoutubeDLHTTPSHandler(params, context=context, **kwargs)
|
return YoutubeDLHTTPSHandler(params, context=context, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def bug_reports_message():
|
def bug_reports_message(before=';'):
|
||||||
if ytdl_is_updateable():
|
if ytdl_is_updateable():
|
||||||
update_cmd = 'type youtube-dl -U to update'
|
update_cmd = 'type youtube-dl -U to update'
|
||||||
else:
|
else:
|
||||||
update_cmd = 'see https://yt-dl.org/update on how to update'
|
update_cmd = 'see https://github.com/ytdl-org/youtube-dl/#user-content-installation on how to update'
|
||||||
msg = '; please report this issue on https://yt-dl.org/bug .'
|
|
||||||
msg += ' Make sure you are using the latest version; %s.' % update_cmd
|
msg = (
|
||||||
msg += ' Be sure to call youtube-dl with the --verbose flag and include its complete output.'
|
'please report this issue on https://github.com/ytdl-org/youtube-dl/issues ,'
|
||||||
return msg
|
' using the appropriate issue template.'
|
||||||
|
' Make sure you are using the latest version; %s.'
|
||||||
|
' Be sure to call youtube-dl with the --verbose option and include the complete output.'
|
||||||
|
) % update_cmd
|
||||||
|
|
||||||
|
before = (before or '').rstrip()
|
||||||
|
if not before or before.endswith(('.', '!', '?')):
|
||||||
|
msg = msg[0].title() + msg[1:]
|
||||||
|
|
||||||
|
return (before + ' ' if before else '') + msg
|
||||||
|
|
||||||
|
|
||||||
class YoutubeDLError(Exception):
|
class YoutubeDLError(Exception):
|
||||||
|
Loading…
Reference in New Issue
Block a user