diff options
author | Jesús <heckyel@hyperbola.info> | 2021-10-18 13:17:33 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2021-10-18 13:17:33 -0500 |
commit | 2272571a0a3b53571a440d0a8ea178a74b7803e6 (patch) | |
tree | 267d08a8b6e95b2d90e2545863f6eb8fae55cd71 | |
parent | 59687ede1efedf6e05b2cb0f943f3f6050bab411 (diff) | |
download | hypervideo-pre-2272571a0a3b53571a440d0a8ea178a74b7803e6.tar.lz hypervideo-pre-2272571a0a3b53571a440d0a8ea178a74b7803e6.tar.xz hypervideo-pre-2272571a0a3b53571a440d0a8ea178a74b7803e6.zip |
README.md: update
-rw-r--r-- | README.md | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -28,7 +28,9 @@ To install on Hyperbola run: # DESCRIPTION **hypervideo** A fork of youtube-dl without nonfree parts - $ hypervideo [OPTIONS] URL [URL...] +```console +$ hypervideo [OPTIONS] URL [URL...] +``` # OPTIONS -h, --help Print this help text and exit @@ -985,7 +987,7 @@ After you have ensured this site is distributing its content legally, you can fo 4. Start with this simple template and save it to `youtube_dl/extractor/yourextractor.py`: - ```python +```python # coding: utf-8 from __future__ import unicode_literals @@ -1024,7 +1026,8 @@ After you have ensured this site is distributing its content legally, you can fo 'uploader': self._search_regex(r'<div[^>]+id="uploader"[^>]*>([^<]+)<', webpage, 'uploader', fatal=False), # 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). 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. |