2021-06-03 11:43:42 +02:00
|
|
|
#!/usr/bin/env python3
|
2022-06-24 13:06:16 +02:00
|
|
|
|
|
|
|
# Allow direct execution
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
|
|
|
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
|
|
|
|
|
|
|
2022-06-30 00:36:27 +02:00
|
|
|
import re
|
2016-03-06 23:16:13 +01:00
|
|
|
|
2023-12-30 22:27:36 +01:00
|
|
|
from devscripts.utils import get_filename_args, read_file, write_file
|
2022-04-27 10:15:45 +02:00
|
|
|
|
2022-06-30 00:36:27 +02:00
|
|
|
VERBOSE_TMPL = '''
|
|
|
|
- type: checkboxes
|
|
|
|
id: verbose
|
|
|
|
attributes:
|
|
|
|
label: Provide verbose output that clearly demonstrates the problem
|
|
|
|
options:
|
|
|
|
- label: Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
|
|
|
|
required: true
|
2023-02-28 19:01:02 +01:00
|
|
|
- label: "If using API, add `'verbose': True` to `YoutubeDL` params instead"
|
|
|
|
required: false
|
2022-06-30 00:36:27 +02:00
|
|
|
- label: Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below
|
|
|
|
required: true
|
|
|
|
- type: textarea
|
|
|
|
id: log
|
|
|
|
attributes:
|
2024-11-10 22:38:50 +01:00
|
|
|
label: Complete Verbose Output. This is **NOT** optional.
|
2022-06-30 00:36:27 +02:00
|
|
|
description: |
|
|
|
|
It should start like this:
|
|
|
|
placeholder: |
|
2023-11-13 01:02:01 +01:00
|
|
|
[debug] Command-line config: ['-vU', 'https://www.youtube.com/watch?v=BaW_jenozKc']
|
2022-06-30 00:36:27 +02:00
|
|
|
[debug] Encodings: locale cp65001, fs utf-8, pref cp65001, out utf-8, error utf-8, screen utf-8
|
2024-10-23 08:33:50 +02:00
|
|
|
[debug] yt-dlp version nightly@... from yt-dlp/yt-dlp-nightly-builds [1a176d874] (win_exe)
|
|
|
|
[debug] Python 3.10.11 (CPython AMD64 64bit) - Windows-10-10.0.20348-SP0 (OpenSSL 1.1.1t 7 Feb 2023)
|
|
|
|
[debug] exe versions: ffmpeg 7.0.2 (setts), ffprobe 7.0.2
|
|
|
|
[debug] Optional libraries: Cryptodome-3.21.0, brotli-1.1.0, certifi-2024.08.30, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.32.3, sqlite3-3.40.1, urllib3-2.2.3, websockets-13.1
|
2022-06-30 00:36:27 +02:00
|
|
|
[debug] Proxy map: {}
|
2024-10-23 08:33:50 +02:00
|
|
|
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
|
|
|
|
[debug] Loaded 1838 extractors
|
|
|
|
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
|
|
|
|
Latest version: nightly@... from yt-dlp/yt-dlp-nightly-builds
|
2023-11-13 01:02:01 +01:00
|
|
|
yt-dlp is up to date (nightly@... from yt-dlp/yt-dlp-nightly-builds)
|
|
|
|
[youtube] Extracting URL: https://www.youtube.com/watch?v=BaW_jenozKc
|
2022-06-30 00:36:27 +02:00
|
|
|
<more lines>
|
|
|
|
render: shell
|
|
|
|
validations:
|
|
|
|
required: true
|
|
|
|
'''.strip()
|
|
|
|
|
2022-08-08 21:38:47 +02:00
|
|
|
NO_SKIP = '''
|
|
|
|
- type: checkboxes
|
|
|
|
attributes:
|
|
|
|
label: DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
|
|
|
|
description: Fill all fields even if you think it is irrelevant for the issue
|
|
|
|
options:
|
2023-02-17 13:22:22 +01:00
|
|
|
- label: I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\\* field
|
2022-08-08 21:38:47 +02:00
|
|
|
required: true
|
|
|
|
'''.strip()
|
2022-06-30 00:36:27 +02:00
|
|
|
|
2016-03-06 23:16:13 +01:00
|
|
|
|
2022-08-08 21:38:47 +02:00
|
|
|
def main():
|
2023-11-13 01:02:01 +01:00
|
|
|
fields = {'no_skip': NO_SKIP}
|
2022-06-30 00:36:27 +02:00
|
|
|
fields['verbose'] = VERBOSE_TMPL % fields
|
|
|
|
fields['verbose_optional'] = re.sub(r'(\n\s+validations:)?\n\s+required: true', '', fields['verbose'])
|
|
|
|
|
2022-08-08 21:38:47 +02:00
|
|
|
infile, outfile = get_filename_args(has_infile=True)
|
|
|
|
write_file(outfile, read_file(infile) % fields)
|
2016-03-06 23:16:13 +01:00
|
|
|
|
2022-04-11 17:10:28 +02:00
|
|
|
|
2016-03-06 23:16:13 +01:00
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|