diff options
author | LewdyCoder <88900506+LewdyCoder@users.noreply.github.com> | 2022-05-30 03:50:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-30 02:50:50 +0100 |
commit | 9aa8e5340f3d5ece372b983f8e399277ca1f1fe4 (patch) | |
tree | b279900809ed98a9987147a4c4d7be9135d14666 | |
parent | 04fd3289d30de3c99c7d2de34d555b050bc96d4d (diff) | |
download | youtube-dl-9aa8e5340f3d5ece372b983f8e399277ca1f1fe4.tar.gz youtube-dl-9aa8e5340f3d5ece372b983f8e399277ca1f1fe4.tar.xz |
[Readme] Clarified extractor naming (#29799)
* Exported usable extractors must be named `xxxxIE`
Co-authored-by: dirkf <fieldhouse@gmx.net>
-rw-r--r-- | CONTRIBUTING.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 58ab3a4b8..ff40cef78 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -150,7 +150,7 @@ After you have ensured this site is distributing its content legally, you can fo # TODO more properties (see youtube_dl/extractor/common.py) } ``` -5. Add an import in [`youtube_dl/extractor/extractors.py`](https://github.com/ytdl-org/youtube-dl/blob/master/youtube_dl/extractor/extractors.py). +5. Add an import in [`youtube_dl/extractor/extractors.py`](https://github.com/ytdl-org/youtube-dl/blob/master/youtube_dl/extractor/extractors.py). This makes the extractor available for use, as long as the class ends with `IE`. 6. Run `python test/test_download.py TestDownload.test_YourExtractor`. This *should fail* at first, but you can continually re-run it until you're done. If you decide to add more than one test, then rename ``_TEST`` to ``_TESTS`` and make it into a list of dictionaries. The tests will then be named `TestDownload.test_YourExtractor`, `TestDownload.test_YourExtractor_1`, `TestDownload.test_YourExtractor_2`, etc. Note that tests with `only_matching` key in test's dict are not counted in. 7. Have a look at [`youtube_dl/extractor/common.py`](https://github.com/ytdl-org/youtube-dl/blob/master/youtube_dl/extractor/common.py) for possible helper methods and a [detailed description of what your extractor should and may return](https://github.com/ytdl-org/youtube-dl/blob/7f41a598b3fba1bcab2817de64a08941200aa3c8/youtube_dl/extractor/common.py#L94-L303). Add tests and code for as many as you want. 8. Make sure your code follows [youtube-dl coding conventions](#youtube-dl-coding-conventions) and check the code with [flake8](https://flake8.pycqa.org/en/latest/index.html#quickstart): |