mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 06:10:12 +01:00
parent
bc36bc36a1
commit
2e7781a93c
2
.github/ISSUE_TEMPLATE/6_question.md
vendored
2
.github/ISSUE_TEMPLATE/6_question.md
vendored
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
name: Ask question
|
name: Ask question
|
||||||
about: Ask youtube-dl related question
|
about: Ask yt-dlp related question
|
||||||
title: "[Question]"
|
title: "[Question]"
|
||||||
labels: question
|
labels: question
|
||||||
assignees: ''
|
assignees: ''
|
||||||
|
|
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
|
@ -11,7 +11,7 @@ ### Before submitting a *pull request* make sure you have:
|
||||||
- [ ] [Searched](https://github.com/yt-dlp/yt-dlp/search?q=is%3Apr&type=Issues) the bugtracker for similar pull requests
|
- [ ] [Searched](https://github.com/yt-dlp/yt-dlp/search?q=is%3Apr&type=Issues) the bugtracker for similar pull requests
|
||||||
- [ ] Checked the code with [flake8](https://pypi.python.org/pypi/flake8)
|
- [ ] Checked the code with [flake8](https://pypi.python.org/pypi/flake8)
|
||||||
|
|
||||||
### In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under [Unlicense](http://unlicense.org/). Check one of the following options:
|
### In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under [Unlicense](http://unlicense.org/). Check one of the following options:
|
||||||
- [ ] I am the original author of this code and I am willing to release it under [Unlicense](http://unlicense.org/)
|
- [ ] I am the original author of this code and I am willing to release it under [Unlicense](http://unlicense.org/)
|
||||||
- [ ] I am not the original author of this code but it is in public domain or released under [Unlicense](http://unlicense.org/) (provide reliable evidence)
|
- [ ] I am not the original author of this code but it is in public domain or released under [Unlicense](http://unlicense.org/) (provide reliable evidence)
|
||||||
|
|
||||||
|
|
|
@ -351,7 +351,7 @@ ## Video Selection:
|
||||||
filters can be checked with "&". Use a "\"
|
filters can be checked with "&". Use a "\"
|
||||||
to escape "&" or quotes if needed. Eg:
|
to escape "&" or quotes if needed. Eg:
|
||||||
--match-filter "!is_live & like_count>?100
|
--match-filter "!is_live & like_count>?100
|
||||||
& description~=\'(?i)\bcats \& dogs\b\'"
|
& description~='(?i)\bcats \& dogs\b'"
|
||||||
matches only videos that are not live, has
|
matches only videos that are not live, has
|
||||||
a like count more than 100 (or the like
|
a like count more than 100 (or the like
|
||||||
field is not available), and also has a
|
field is not available), and also has a
|
||||||
|
@ -1173,7 +1173,9 @@ ## Filtering Formats
|
||||||
|
|
||||||
## Sorting Formats
|
## Sorting Formats
|
||||||
|
|
||||||
You can change the criteria for being considered the `best` by using `-S` (`--format-sort`). The general format for this is `--format-sort field1,field2...`. The available fields are:
|
You can change the criteria for being considered the `best` by using `-S` (`--format-sort`). The general format for this is `--format-sort field1,field2...`.
|
||||||
|
|
||||||
|
The available fields are:
|
||||||
|
|
||||||
- `hasvid`: Gives priority to formats that has a video stream
|
- `hasvid`: Gives priority to formats that has a video stream
|
||||||
- `hasaud`: Gives priority to formats that has a audio stream
|
- `hasaud`: Gives priority to formats that has a audio stream
|
||||||
|
@ -1339,7 +1341,7 @@ # MODIFYING METADATA
|
||||||
|
|
||||||
`--replace-in-metadata FIELDS REGEX REPLACE` is used to replace text in any metadata field using [python regular expression](https://docs.python.org/3/library/re.html#regular-expression-syntax). [Backreferences](https://docs.python.org/3/library/re.html?highlight=backreferences#re.sub) can be used in the replace string for advanced use.
|
`--replace-in-metadata FIELDS REGEX REPLACE` is used to replace text in any metadata field using [python regular expression](https://docs.python.org/3/library/re.html#regular-expression-syntax). [Backreferences](https://docs.python.org/3/library/re.html?highlight=backreferences#re.sub) can be used in the replace string for advanced use.
|
||||||
|
|
||||||
The general syntax of `--parse-metadata FROM:TO` is to give the name of a field or a template (with same syntax as [output template](#output-template)) to extract data from, and the format to interpret it as, separated by a colon `:`. Either a [python regular expression](https://docs.python.org/3/library/re.html#regular-expression-syntax) with named capture groups or a similar syntax to the [output template](#output-template) (only `%(field)s` formatting is supported) can be used for `TO`. The option can be used multiple times to parse and modify various fields.
|
The general syntax of `--parse-metadata FROM:TO` is to give the name of a field or an [output template](#output-template) to extract data from, and the format to interpret it as, separated by a colon `:`. Either a [python regular expression](https://docs.python.org/3/library/re.html#regular-expression-syntax) with named capture groups or a similar syntax to the [output template](#output-template) (only `%(field)s` formatting is supported) can be used for `TO`. The option can be used multiple times to parse and modify various fields.
|
||||||
|
|
||||||
Note that any field created by this can be used in the [output template](#output-template) and will also affect the media file's metadata added when using `--add-metadata`.
|
Note that any field created by this can be used in the [output template](#output-template) and will also affect the media file's metadata added when using `--add-metadata`.
|
||||||
|
|
||||||
|
|
|
@ -411,7 +411,7 @@ def _dict_from_options_callback(
|
||||||
'Python style regular expression matching can be done using "~=", '
|
'Python style regular expression matching can be done using "~=", '
|
||||||
'and multiple filters can be checked with "&". '
|
'and multiple filters can be checked with "&". '
|
||||||
'Use a "\\" to escape "&" or quotes if needed. Eg: --match-filter '
|
'Use a "\\" to escape "&" or quotes if needed. Eg: --match-filter '
|
||||||
r'"!is_live & like_count>?100 & description~=\'(?i)\bcats \& dogs\b\'" '
|
'"!is_live & like_count>?100 & description~=\'(?i)\\bcats \\& dogs\\b\'" '
|
||||||
'matches only videos that are not live, has a like count more than 100 '
|
'matches only videos that are not live, has a like count more than 100 '
|
||||||
'(or the like field is not available), and also has a description '
|
'(or the like field is not available), and also has a description '
|
||||||
'that contains the phrase "cats & dogs" (ignoring case)'))
|
'that contains the phrase "cats & dogs" (ignoring case)'))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user