diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 67d637275..1b9d3c59d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,7 @@ default: py2.7-core: image: python:2.7 variables: - YTDL_TEST_SET: core + HDL_TEST_SET: core before_script: - pip install nose script: @@ -15,7 +15,7 @@ py2.7-core: py2.7-download: image: python:2.7 variables: - YTDL_TEST_SET: download + HDL_TEST_SET: download allow_failure: true before_script: - pip install nose @@ -25,7 +25,7 @@ py2.7-download: py3.2-core: image: python:3.2 variables: - YTDL_TEST_SET: core + HDL_TEST_SET: core before_script: - pip install nose script: @@ -34,7 +34,7 @@ py3.2-core: py3.2-download: image: python:3.2 variables: - YTDL_TEST_SET: download + HDL_TEST_SET: download allow_failure: true before_script: - pip install nose @@ -44,7 +44,7 @@ py3.2-download: py3.3-core: image: python:3.3-alpine variables: - YTDL_TEST_SET: core + HDL_TEST_SET: core before_script: - apk update - apk add bash @@ -55,7 +55,7 @@ py3.3-core: py3.3-download: image: python:3.3-alpine variables: - YTDL_TEST_SET: download + HDL_TEST_SET: download before_script: - apk update - apk add bash @@ -67,14 +67,14 @@ py3.3-download: py3.4-core: image: python:3.4-alpine variables: - YTDL_TEST_SET: core + HDL_TEST_SET: core script: - ./devscripts/run_tests.sh py3.4-download: image: python:3.4-alpine variables: - YTDL_TEST_SET: download + HDL_TEST_SET: download allow_failure: true script: - ./devscripts/run_tests.sh @@ -82,14 +82,14 @@ py3.4-download: py3.5-core: image: python:3.5-alpine variables: - YTDL_TEST_SET: core + HDL_TEST_SET: core script: - ./devscripts/run_tests.sh py3.5-download: image: python:3.5-alpine variables: - YTDL_TEST_SET: download + HDL_TEST_SET: download allow_failure: true script: - ./devscripts/run_tests.sh @@ -97,14 +97,14 @@ py3.5-download: py3.6-core: image: python:3.6-alpine variables: - YTDL_TEST_SET: core + HDL_TEST_SET: core script: - ./devscripts/run_tests.sh py3.6-download: image: python:3.6-alpine variables: - YTDL_TEST_SET: download + HDL_TEST_SET: download allow_failure: true script: - ./devscripts/run_tests.sh @@ -112,14 +112,14 @@ py3.6-download: py3.7-core: image: python:3.7-alpine variables: - YTDL_TEST_SET: core + HDL_TEST_SET: core script: - ./devscripts/run_tests.sh py3.7-download: image: python:3.7-alpine variables: - YTDL_TEST_SET: download + HDL_TEST_SET: download allow_failure: true script: - ./devscripts/run_tests.sh @@ -127,14 +127,14 @@ py3.7-download: py3.8-core: image: python:3.8-alpine variables: - YTDL_TEST_SET: core + HDL_TEST_SET: core script: - ./devscripts/run_tests.sh py3.8-download: image: python:3.8-alpine variables: - YTDL_TEST_SET: download + HDL_TEST_SET: download allow_failure: true script: - ./devscripts/run_tests.sh @@ -142,14 +142,14 @@ py3.8-download: py3.9-core: image: python:3.9-alpine variables: - YTDL_TEST_SET: core + HDL_TEST_SET: core script: - ./devscripts/run_tests.sh py3.9-download: image: python:3.9-alpine variables: - YTDL_TEST_SET: download + HDL_TEST_SET: download allow_failure: true script: - ./devscripts/run_tests.sh diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 51afd469a..000000000 --- a/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -language: python -python: - - "2.6" - - "2.7" - - "3.2" - - "3.3" - - "3.4" - - "3.5" - - "3.6" - - "pypy" - - "pypy3" -dist: trusty -env: - - YTDL_TEST_SET=core - - YTDL_TEST_SET=download -jobs: - include: - - python: 3.7 - dist: xenial - env: YTDL_TEST_SET=core - - python: 3.7 - dist: xenial - env: YTDL_TEST_SET=download - - python: 3.8 - dist: xenial - env: YTDL_TEST_SET=core - - python: 3.8 - dist: xenial - env: YTDL_TEST_SET=download - - python: 3.8-dev - dist: xenial - env: YTDL_TEST_SET=core - - python: 3.8-dev - dist: xenial - env: YTDL_TEST_SET=download - - env: JYTHON=true; YTDL_TEST_SET=core - - env: JYTHON=true; YTDL_TEST_SET=download - - name: flake8 - python: 3.8 - dist: xenial - install: pip install flake8 - script: flake8 . - fast_finish: true - allow_failures: - - env: YTDL_TEST_SET=download - - env: JYTHON=true; YTDL_TEST_SET=core - - env: JYTHON=true; YTDL_TEST_SET=download -before_install: - - if [ "$JYTHON" == "true" ]; then ./devscripts/install_jython.sh; export PATH="$HOME/jython/bin:$PATH"; fi -script: ./devscripts/run_tests.sh diff --git a/AUTHORS b/AUTHORS index b507cb8df..6b63f820b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -246,3 +246,5 @@ Enes Solak Nathan Rossi Thomas van der Berg Luca Cherubin +Dominika Liberda +Laura Liberda diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 58ab3a4b8..000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,434 +0,0 @@ -**Please include the full output of youtube-dl when run with `-v`**, i.e. **add** `-v` flag to **your command line**, copy the **whole** output and post it in the issue body wrapped in \`\`\` for better formatting. It should look similar to this: -``` -$ youtube-dl -v -[debug] System config: [] -[debug] User config: [] -[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=BaW_jenozKcj'] -[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251 -[debug] youtube-dl version 2015.12.06 -[debug] Git HEAD: 135392e -[debug] Python version 2.6.6 - Windows-2003Server-5.2.3790-SP2 -[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4 -[debug] Proxy map: {} -... -``` -**Do not post screenshots of verbose logs; only plain text is acceptable.** - -The output (including the first lines) contains important debugging information. Issues without the full output are often not reproducible and therefore do not get solved in short order, if ever. - -Please re-read your issue once again to avoid a couple of common mistakes (you can and should use this as a checklist): - -### Is the description of the issue itself sufficient? - -We often get issue reports that we cannot really decipher. While in most cases we eventually get the required information after asking back multiple times, this poses an unnecessary drain on our resources. Many contributors, including myself, are also not native speakers, so we may misread some parts. - -So please elaborate on what feature you are requesting, or what bug you want to be fixed. Make sure that it's obvious - -- What the problem is -- How it could be fixed -- How your proposed solution would look like - -If your report is shorter than two lines, it is almost certainly missing some of these, which makes it hard for us to respond to it. We're often too polite to close the issue outright, but the missing info makes misinterpretation likely. As a committer myself, I often get frustrated by these issues, since the only possible way for me to move forward on them is to ask for clarification over and over. - -For bug reports, this means that your report should contain the *complete* output of youtube-dl when called with the `-v` flag. The error message you get for (most) bugs even says so, but you would not believe how many of our bug reports do not contain this information. - -If your server has multiple IPs or you suspect censorship, adding `--call-home` may be a good idea to get more diagnostics. If the error is `ERROR: Unable to extract ...` and you cannot reproduce it from multiple countries, add `--dump-pages` (warning: this will yield a rather large output, redirect it to the file `log.txt` by adding `>log.txt 2>&1` to your command-line) or upload the `.dump` files you get when you add `--write-pages` [somewhere](https://gist.github.com/). - -**Site support requests must contain an example URL**. An example URL is a URL you might want to download, like `https://www.youtube.com/watch?v=BaW_jenozKc`. There should be an obvious video present. Except under very special circumstances, the main page of a video service (e.g. `https://www.youtube.com/`) is *not* an example URL. - -### Are you using the latest version? - -Before reporting any issue, type `youtube-dl -U`. This should report that you're up-to-date. About 20% of the reports we receive are already fixed, but people are using outdated versions. This goes for feature requests as well. - -### Is the issue already documented? - -Make sure that someone has not already opened the issue you're trying to open. Search at the top of the window or browse the [GitHub Issues](https://github.com/ytdl-org/youtube-dl/search?type=Issues) of this repository. If there is an issue, feel free to write something along the lines of "This affects me as well, with version 2015.01.01. Here is some more information on the issue: ...". While some issues may be old, a new post into them often spurs rapid activity. - -### Why are existing options not enough? - -Before requesting a new feature, please have a quick peek at [the list of supported options](https://github.com/ytdl-org/youtube-dl/blob/master/README.md#options). Many feature requests are for features that actually exist already! Please, absolutely do show off your work in the issue report and detail how the existing similar options do *not* solve your problem. - -### Is there enough context in your bug report? - -People want to solve problems, and often think they do us a favor by breaking down their larger problems (e.g. wanting to skip already downloaded files) to a specific request (e.g. requesting us to look whether the file exists before downloading the info page). However, what often happens is that they break down the problem into two steps: One simple, and one impossible (or extremely complicated one). - -We are then presented with a very complicated request when the original problem could be solved far easier, e.g. by recording the downloaded video IDs in a separate file. To avoid this, you must include the greater context where it is non-obvious. In particular, every feature request that does not consist of adding support for a new site should contain a use case scenario that explains in what situation the missing feature would be useful. - -### Does the issue involve one problem, and one problem only? - -Some of our users seem to think there is a limit of issues they can or should open. There is no limit of issues they can or should open. While it may seem appealing to be able to dump all your issues into one ticket, that means that someone who solves one of your issues cannot mark the issue as closed. Typically, reporting a bunch of issues leads to the ticket lingering since nobody wants to attack that behemoth, until someone mercifully splits the issue into multiple ones. - -In particular, every site support request issue should only pertain to services at one site (generally under a common domain, but always using the same backend technology). Do not request support for vimeo user videos, White house podcasts, and Google Plus pages in the same issue. Also, make sure that you don't post bug reports alongside feature requests. As a rule of thumb, a feature request does not include outputs of youtube-dl that are not immediately related to the feature at hand. Do not post reports of a network error alongside the request for a new video service. - -### Is anyone going to need the feature? - -Only post features that you (or an incapacitated friend you can personally talk to) require. Do not post features because they seem like a good idea. If they are really useful, they will be requested by someone who requires them. - -### Is your question about youtube-dl? - -It may sound strange, but some bug reports we receive are completely unrelated to youtube-dl and relate to a different, or even the reporter's own, application. Please make sure that you are actually using youtube-dl. If you are using a UI for youtube-dl, report the bug to the maintainer of the actual application providing the UI. On the other hand, if your UI for youtube-dl fails in some way you believe is related to youtube-dl, by all means, go ahead and report the bug. - -# DEVELOPER INSTRUCTIONS - -Most users do not need to build youtube-dl and can [download the builds](https://ytdl-org.github.io/youtube-dl/download.html) or get them from their distribution. - -To run youtube-dl as a developer, you don't need to build anything either. Simply execute - - python -m youtube_dl - -To run the test, simply invoke your favorite test runner, or execute a test file directly; any of the following work: - - python -m unittest discover - python test/test_download.py - nosetests - -See item 6 of [new extractor tutorial](#adding-support-for-a-new-site) for how to run extractor specific test cases. - -If you want to create a build of youtube-dl yourself, you'll need - -* python -* make (only GNU make is supported) -* pandoc -* zip -* nosetests - -### Adding support for a new site - -If you want to add support for a new site, first of all **make sure** this site is **not dedicated to [copyright infringement](README.md#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. youtube-dl does **not support** such sites thus pull requests adding support for them **will be rejected**. - -After you have ensured this site is distributing its content legally, you can follow this quick list (assuming your service is called `yourextractor`): - -1. [Fork this repository](https://github.com/ytdl-org/youtube-dl/fork) -2. Check out the source code with: - - git clone git@github.com:YOUR_GITHUB_USERNAME/youtube-dl.git - -3. Start a new git branch with - - cd youtube-dl - git checkout -b yourextractor - -4. Start with this simple template and save it to `youtube_dl/extractor/yourextractor.py`: - - ```python - # coding: utf-8 - from __future__ import unicode_literals - - from .common import InfoExtractor - - - class YourExtractorIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?yourextractor\.com/watch/(?P[0-9]+)' - _TEST = { - 'url': 'https://yourextractor.com/watch/42', - 'md5': 'TODO: md5 sum of the first 10241 bytes of the video file (use --test)', - 'info_dict': { - 'id': '42', - 'ext': 'mp4', - 'title': 'Video title goes here', - 'thumbnail': r're:^https?://.*\.jpg$', - # TODO more properties, either as: - # * A value - # * MD5 checksum; start the string with md5: - # * A regular expression; start the string with re: - # * Any Python type (for example int or float) - } - } - - def _real_extract(self, url): - video_id = self._match_id(url) - webpage = self._download_webpage(url, video_id) - - # TODO more code goes here, for example ... - title = self._html_search_regex(r'

(.+?)

', webpage, 'title') - - return { - 'id': video_id, - 'title': title, - 'description': self._og_search_description(webpage), - 'uploader': self._search_regex(r']+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. -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): - - $ flake8 youtube_dl/extractor/yourextractor.py - -9. Make sure your code works under all [Python](https://www.python.org/) versions claimed supported by youtube-dl, namely 2.6, 2.7, and 3.2+. -10. When the tests pass, [add](https://git-scm.com/docs/git-add) the new files and [commit](https://git-scm.com/docs/git-commit) them and [push](https://git-scm.com/docs/git-push) the result, like this: - - $ git add youtube_dl/extractor/extractors.py - $ git add youtube_dl/extractor/yourextractor.py - $ git commit -m '[yourextractor] Add new extractor' - $ git push origin yourextractor - -11. Finally, [create a pull request](https://help.github.com/articles/creating-a-pull-request). We'll then review and merge it. - -In any case, thank you very much for your contributions! - -## youtube-dl coding conventions - -This section introduces a guide lines for writing idiomatic, robust and future-proof extractor code. - -Extractors are very fragile by nature since they depend on the layout of the source data provided by 3rd party media hosters out of your control and this layout tends to change. As an extractor implementer your task is not only to write code that will extract media links and metadata correctly but also to minimize dependency on the source's layout and even to make the code foresee potential future changes and be ready for that. This is important because it will allow the extractor not to break on minor layout changes thus keeping old youtube-dl versions working. Even though this breakage issue is easily fixed by emitting a new version of youtube-dl with a fix incorporated, all the previous versions become broken in all repositories and distros' packages that may not be so prompt in fetching the update from us. Needless to say, some non rolling release distros may never receive an update at all. - -### Mandatory and optional metafields - -For extraction to work youtube-dl relies on metadata your extractor extracts and provides to youtube-dl expressed by an [information dictionary](https://github.com/ytdl-org/youtube-dl/blob/7f41a598b3fba1bcab2817de64a08941200aa3c8/youtube_dl/extractor/common.py#L94-L303) or simply *info dict*. Only the following meta fields in the *info dict* are considered mandatory for a successful extraction process by youtube-dl: - - - `id` (media identifier) - - `title` (media title) - - `url` (media download URL) or `formats` - -In fact only the last option is technically mandatory (i.e. if you can't figure out the download location of the media the extraction does not make any sense). But by convention youtube-dl also treats `id` and `title` as mandatory. Thus the aforementioned metafields are the critical data that the extraction does not make any sense without and if any of them fail to be extracted then the extractor is considered completely broken. - -[Any field](https://github.com/ytdl-org/youtube-dl/blob/7f41a598b3fba1bcab2817de64a08941200aa3c8/youtube_dl/extractor/common.py#L188-L303) apart from the aforementioned ones are considered **optional**. That means that extraction should be **tolerant** to situations when sources for these fields can potentially be unavailable (even if they are always available at the moment) and **future-proof** in order not to break the extraction of general purpose mandatory fields. - -#### Example - -Say you have some source dictionary `meta` that you've fetched as JSON with HTTP request and it has a key `summary`: - -```python -meta = self._download_json(url, video_id) -``` - -Assume at this point `meta`'s layout is: - -```python -{ - ... - "summary": "some fancy summary text", - ... -} -``` - -Assume you want to extract `summary` and put it into the resulting info dict as `description`. Since `description` is an optional meta field you should be ready that this key may be missing from the `meta` dict, so that you should extract it like: - -```python -description = meta.get('summary') # correct -``` - -and not like: - -```python -description = meta['summary'] # incorrect -``` - -The latter will break extraction process with `KeyError` if `summary` disappears from `meta` at some later time but with the former approach extraction will just go ahead with `description` set to `None` which is perfectly fine (remember `None` is equivalent to the absence of data). - -Similarly, you should pass `fatal=False` when extracting optional data from a webpage with `_search_regex`, `_html_search_regex` or similar methods, for instance: - -```python -description = self._search_regex( - r']+id="title"[^>]*>([^<]+)<', - webpage, 'description', fatal=False) -``` - -With `fatal` set to `False` if `_search_regex` fails to extract `description` it will emit a warning and continue extraction. - -You can also pass `default=`, for example: - -```python -description = self._search_regex( - r']+id="title"[^>]*>([^<]+)<', - webpage, 'description', default=None) -``` - -On failure this code will silently continue the extraction with `description` set to `None`. That is useful for metafields that may or may not be present. - -### Provide fallbacks - -When extracting metadata try to do so from multiple sources. For example if `title` is present in several places, try extracting from at least some of them. This makes it more future-proof in case some of the sources become unavailable. - -#### Example - -Say `meta` from the previous example has a `title` and you are about to extract it. Since `title` is a mandatory meta field you should end up with something like: - -```python -title = meta['title'] -``` - -If `title` disappears from `meta` in future due to some changes on the hoster's side the extraction would fail since `title` is mandatory. That's expected. - -Assume that you have some another source you can extract `title` from, for example `og:title` HTML meta of a `webpage`. In this case you can provide a fallback scenario: - -```python -title = meta.get('title') or self._og_search_title(webpage) -``` - -This code will try to extract from `meta` first and if it fails it will try extracting `og:title` from a `webpage`. - -### Regular expressions - -#### Don't capture groups you don't use - -Capturing group must be an indication that it's used somewhere in the code. Any group that is not used must be non capturing. - -##### Example - -Don't capture id attribute name here since you can't use it for anything anyway. - -Correct: - -```python -r'(?:id|ID)=(?P\d+)' -``` - -Incorrect: -```python -r'(id|ID)=(?P\d+)' -``` - - -#### Make regular expressions relaxed and flexible - -When using regular expressions try to write them fuzzy, relaxed and flexible, skipping insignificant parts that are more likely to change, allowing both single and double quotes for quoted values and so on. - -##### Example - -Say you need to extract `title` from the following HTML code: - -```html -some fancy title -``` - -The code for that task should look similar to: - -```python -title = self._search_regex( - r']+class="title"[^>]*>([^<]+)', webpage, 'title') -``` - -Or even better: - -```python -title = self._search_regex( - r']+class=(["\'])title\1[^>]*>(?P[^<]+)', - webpage, 'title', group='title') -``` - -Note how you tolerate potential changes in the `style` attribute's value or switch from using double quotes to single for `class` attribute: - -The code definitely should not look like: - -```python -title = self._search_regex( - r'<span style="position: absolute; left: 910px; width: 90px; float: right; z-index: 9999;" class="title">(.*?)</span>', - webpage, 'title', group='title') -``` - -### Long lines policy - -There is a soft limit to keep lines of code under 80 characters long. This means it should be respected if possible and if it does not make readability and code maintenance worse. - -For example, you should **never** split long string literals like URLs or some other often copied entities over multiple lines to fit this limit: - -Correct: - -```python -'https://www.youtube.com/watch?v=FqZTN594JQw&list=PLMYEtVRpaqY00V9W81Cwmzp6N6vZqfUKD4' -``` - -Incorrect: - -```python -'https://www.youtube.com/watch?v=FqZTN594JQw&list=' -'PLMYEtVRpaqY00V9W81Cwmzp6N6vZqfUKD4' -``` - -### Inline values - -Extracting variables is acceptable for reducing code duplication and improving readability of complex expressions. However, you should avoid extracting variables used only once and moving them to opposite parts of the extractor file, which makes reading the linear flow difficult. - -#### Example - -Correct: - -```python -title = self._html_search_regex(r'<title>([^<]+)', webpage, 'title') -``` - -Incorrect: - -```python -TITLE_RE = r'([^<]+)' -# ...some lines of code... -title = self._html_search_regex(TITLE_RE, webpage, 'title') -``` - -### Collapse fallbacks - -Multiple fallback values can quickly become unwieldy. Collapse multiple fallback values into a single expression via a list of patterns. - -#### Example - -Good: - -```python -description = self._html_search_meta( - ['og:description', 'description', 'twitter:description'], - webpage, 'description', default=None) -``` - -Unwieldy: - -```python -description = ( - self._og_search_description(webpage, default=None) - or self._html_search_meta('description', webpage, default=None) - or self._html_search_meta('twitter:description', webpage, default=None)) -``` - -Methods supporting list of patterns are: `_search_regex`, `_html_search_regex`, `_og_search_property`, `_html_search_meta`. - -### Trailing parentheses - -Always move trailing parentheses after the last argument. - -#### Example - -Correct: - -```python - lambda x: x['ResultSet']['Result'][0]['VideoUrlSet']['VideoUrl'], - list) -``` - -Incorrect: - -```python - lambda x: x['ResultSet']['Result'][0]['VideoUrlSet']['VideoUrl'], - list, -) -``` - -### Use convenience conversion and parsing functions - -Wrap all extracted numeric data into safe functions from [`youtube_dl/utils.py`](https://github.com/ytdl-org/youtube-dl/blob/master/youtube_dl/utils.py): `int_or_none`, `float_or_none`. Use them for string to number conversions as well. - -Use `url_or_none` for safe URL processing. - -Use `try_get` for safe metadata extraction from parsed JSON. - -Use `unified_strdate` for uniform `upload_date` or any `YYYYMMDD` meta field extraction, `unified_timestamp` for uniform `timestamp` extraction, `parse_filesize` for `filesize` extraction, `parse_count` for count meta fields extraction, `parse_resolution`, `parse_duration` for `duration` extraction, `parse_age_limit` for `age_limit` extraction. - -Explore [`youtube_dl/utils.py`](https://github.com/ytdl-org/youtube-dl/blob/master/youtube_dl/utils.py) for more useful convenience functions. - -#### More examples - -##### Safely extract optional description from parsed JSON -```python -description = try_get(response, lambda x: x['result']['video'][0]['summary'], compat_str) -``` - -##### Safely extract more optional metadata -```python -video = try_get(response, lambda x: x['result']['video'][0], dict) or {} -description = video.get('summary') -duration = float_or_none(video.get('durationMs'), scale=1000) -view_count = int_or_none(video.get('views')) -``` - diff --git a/ChangeLog b/ChangeLog index 9b52b7bd2..a49be9b77 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +version 2020.11.01 +Core +* Changed naming to HaruhiDL + +Extractors +* [youtube] Fixed extracting videos +* [youtube] Removed JSInterpreter and SWFInterpreter, as they would be a + hassle to maintain in the future + + +--- fork line --- + version 2020.09.20 Core @@ -234,7 +246,7 @@ Extractors version 2020.03.01 Core -* [YoutubeDL] Force redirect URL to unicode on python 2 +* [HaruhiDL] Force redirect URL to unicode on python 2 - [options] Remove duplicate short option -v for --version (#24162) Extractors @@ -255,7 +267,7 @@ Extractors version 2020.02.16 Core -* [YoutubeDL] Fix playlist entry indexing with --playlist-items (#10591, +* [HaruhiDL] Fix playlist entry indexing with --playlist-items (#10591, #10622) * [update] Fix updating via symlinks (#23991) + [compat] Introduce compat_realpath (#23991) @@ -649,7 +661,7 @@ Extractors version 2019.09.28 Core -* [YoutubeDL] Honour all --get-* options with --flat-playlist (#22493) +* [HaruhiDL] Honour all --get-* options with --flat-playlist (#22493) Extractors * [vk] Fix extraction (#22522) @@ -715,7 +727,7 @@ version 2019.08.13 Core * [downloader/fragment] Fix ETA calculation of resumed download (#21992) -* [YoutubeDL] Check annotations availability (#18582) +* [HaruhiDL] Check annotations availability (#18582) Extractors * [youtube:playlist] Improve flat extraction (#21927) @@ -1178,7 +1190,7 @@ version 2019.02.08 Core * [utils] Improve JSON-LD regular expression (#18058) -* [YoutubeDL] Fallback to ie_key of matching extractor while making +* [HaruhiDL] Fallback to ie_key of matching extractor while making download archive id when no explicit ie_key is provided (#19022) Extractors @@ -1249,7 +1261,7 @@ Extractors version 2019.01.24 Core -* [YoutubeDL] Fix negation for string operators in format selection (#18961) +* [HaruhiDL] Fix negation for string operators in format selection (#18961) version 2019.01.23 @@ -1257,7 +1269,7 @@ version 2019.01.23 Core * [utils] Fix urljoin for paths with non-http(s) schemes * [extractor/common] Improve jwplayer relative URL handling (#18892) -+ [YoutubeDL] Add negation support for string comparisons in format selection ++ [HaruhiDL] Add negation support for string comparisons in format selection expressions (#18600, #18805) * [extractor/common] Improve HLS video-only format detection (#18923) @@ -1388,8 +1400,8 @@ Extractors version 2018.12.09 Core -* [YoutubeDL] Keep session cookies in cookie file between runs -* [YoutubeDL] Recognize session cookies with expired set to 0 (#12929) +* [HaruhiDL] Keep session cookies in cookie file between runs +* [HaruhiDL] Recognize session cookies with expired set to 0 (#12929) Extractors + [teachable] Add support for teachable platform sites (#5451, #18150, #18272) @@ -1931,7 +1943,7 @@ Extractors version 2018.05.09 Core -* [YoutubeDL] Ensure ext exists for automatic captions +* [HaruhiDL] Ensure ext exists for automatic captions * Introduce --geo-bypass-ip-block Extractors @@ -1977,7 +1989,7 @@ version 2018.04.25 Core * [utils] Fix match_str for boolean meta fields + [Makefile] Add support for pandoc 2 and disable smart extension (#16251) -* [YoutubeDL] Fix typo in media extension compatibility checker (#16215) +* [HaruhiDL] Fix typo in media extension compatibility checker (#16215) Extractors + [openload] Recognize IPv6 stream URLs (#16136, #16137, #16205, #16246, @@ -2017,7 +2029,7 @@ Extractors version 2018.04.09 Core -* [YoutubeDL] Do not save/restore console title while simulate (#16103) +* [HaruhiDL] Do not save/restore console title while simulate (#16103) * [extractor/common] Relax JSON-LD context check (#16006) Extractors @@ -2193,7 +2205,7 @@ Extractors version 2018.02.11 Core -+ [YoutubeDL] Add support for filesize_approx in format selector (#15550) ++ [HaruhiDL] Add support for filesize_approx in format selector (#15550) Extractors + [francetv] Add support for live streams (#13689) @@ -2333,8 +2345,8 @@ Extractors version 2018.01.07 Core -* [utils] Fix youtube-dl under PyPy3 on Windows -* [YoutubeDL] Output python implementation in debug header +* [utils] Fix haruhi-dl under PyPy3 on Windows +* [HaruhiDL] Output python implementation in debug header Extractors + [jwplatform] Add support for multiple embeds (#15192) @@ -2397,7 +2409,7 @@ version 2017.12.23 Core * [extractor/common] Move X-Forwarded-For setup code into _request_webpage -+ [YoutubeDL] Add support for playlist_uploader and playlist_uploader_id in ++ [HaruhiDL] Add support for playlist_uploader and playlist_uploader_id in output template (#11427, #15018) + [extractor/common] Introduce uploader, uploader_id and uploader_url meta fields for playlists (#11427, #15018) @@ -2525,7 +2537,7 @@ version 2017.11.15 Core * [common] Skip Apple FairPlay m3u8 manifests (#14741) -* [YoutubeDL] Fix playlist range optimization for --playlist-items (#14740) +* [HaruhiDL] Fix playlist range optimization for --playlist-items (#14740) Extractors * [vshare] Capture and output error message @@ -2641,7 +2653,7 @@ Extractors version 2017.10.12 Core -* [YoutubeDL] Improve _default_format_spec (#14461) +* [HaruhiDL] Improve _default_format_spec (#14461) Extractors * [steam] Fix extraction (#14067) @@ -2667,8 +2679,8 @@ Extractors version 2017.10.07 Core -* [YoutubeDL] Ignore duplicates in --playlist-items -* [YoutubeDL] Fix out of range --playlist-items for iterable playlists and +* [HaruhiDL] Ignore duplicates in --playlist-items +* [HaruhiDL] Fix out of range --playlist-items for iterable playlists and reduce code duplication (#14425) + [utils] Use cache in OnDemandPagedList by default * [postprocessor/ffmpeg] Convert to opus using libopus (#14381) @@ -2691,7 +2703,7 @@ Extractors version 2017.10.01 Core -* [YoutubeDL] Document youtube_include_dash_manifest +* [HaruhiDL] Document youtube_include_dash_manifest Extractors + [tvp] Add support for new URL schema (#14368) @@ -2742,7 +2754,7 @@ version 2017.09.15 Core * [downloader/fragment] Restart inconsistent incomplete fragment downloads (#13731) -* [YoutubeDL] Download raw subtitles files (#12909, #14191) +* [HaruhiDL] Download raw subtitles files (#12909, #14191) Extractors * [condenast] Fix extraction (#14196, #14207) @@ -2762,7 +2774,7 @@ version 2017.09.10 Core + [utils] Introduce bool_or_none -* [YoutubeDL] Ensure dir existence for each requested format (#14116) +* [HaruhiDL] Ensure dir existence for each requested format (#14116) Extractors * [fox] Fix extraction (#14147) @@ -2852,7 +2864,7 @@ Extractors version 2017.08.18 Core -* [YoutubeDL] Sanitize byte string format URLs (#13951) +* [HaruhiDL] Sanitize byte string format URLs (#13951) + [extractor/common] Add support for float durations in _parse_mpd_formats (#13919) @@ -2870,7 +2882,7 @@ Extractors version 2017.08.13 Core -* [YoutubeDL] Make sure format id is not empty +* [HaruhiDL] Make sure format id is not empty * [extractor/common] Make _family_friendly_search optional * [extractor/common] Respect source's type attribute for HTML5 media (#13892) @@ -2952,8 +2964,8 @@ Extractors version 2017.07.23 Core -* [YoutubeDL] Improve default format specification (#13704) -* [YoutubeDL] Do not override id, extractor and extractor_key for +* [HaruhiDL] Improve default format specification (#13704) +* [HaruhiDL] Do not override id, extractor and extractor_key for url_transparent entities * [extractor/common] Fix playlist_from_matches @@ -2979,7 +2991,7 @@ Extractors version 2017.07.15 Core -* [YoutubeDL] Don't expand environment variables in meta fields (#13637) +* [HaruhiDL] Don't expand environment variables in meta fields (#13637) Extractors * [spiegeltv] Delegate extraction to nexx extractor (#13159) @@ -3052,7 +3064,7 @@ version 2017.06.25 Core + [adobepass] Add support for DIRECTV NOW (mso ATTOTT) (#13472) -* [YoutubeDL] Skip malformed formats for better extraction robustness +* [HaruhiDL] Skip malformed formats for better extraction robustness Extractors + [wsj] Add support for barrons.com (#13470) @@ -3118,7 +3130,7 @@ Core * [utils] Improve unified_timestamp * [extractor/generic] Ensure format id is unicode string * [extractor/common] Return unicode string from _match_id -+ [YoutubeDL] Sanitize more fields (#13313) ++ [HaruhiDL] Sanitize more fields (#13313) Extractors + [xfileshare] Add support for rapidvideo.tv (#13348) @@ -3146,7 +3158,7 @@ Extractors version 2017.06.05 Core -* [YoutubeDL] Don't emit ANSI escape codes on Windows (#13270) +* [HaruhiDL] Don't emit ANSI escape codes on Windows (#13270) Extractors + [bandcamp:weekly] Add support for bandcamp weekly (#12758) @@ -3262,7 +3274,7 @@ Extractors version 2017.05.09 Core -* [YoutubeDL] Force --restrict-filenames when no locale is set on all python +* [HaruhiDL] Force --restrict-filenames when no locale is set on all python versions (#13027) Extractors @@ -3364,7 +3376,7 @@ version 2017.04.26 Core * Introduce --keep-fragments for keeping fragments of fragmented download on disk after download is finished -* [YoutubeDL] Fix output template for missing timestamp (#12796) +* [HaruhiDL] Fix output template for missing timestamp (#12796) * [socks] Handle cases where credentials are required but missing * [extractor/common] Improve HLS extraction (#12211) * Extract m3u8 parsing to separate method @@ -3419,8 +3431,8 @@ Extractors version 2017.04.16 Core -* [YoutubeDL] Apply expand_path after output template substitution -+ [YoutubeDL] Propagate overridden meta fields to extraction results of type +* [HaruhiDL] Apply expand_path after output template substitution ++ [HaruhiDL] Propagate overridden meta fields to extraction results of type url (#11163) Extractors @@ -3508,7 +3520,7 @@ Extractors version 2017.04.02 Core -* [YoutubeDL] Return early when extraction of url_transparent fails +* [HaruhiDL] Return early when extraction of url_transparent fails Extractors * [rai] Fix and improve extraction (#11790) @@ -3573,7 +3585,7 @@ Extractors version 2017.03.20 Core -+ [YoutubeDL] Allow multiple input URLs to be used with stdout (-) as ++ [HaruhiDL] Allow multiple input URLs to be used with stdout (-) as output template + [adobepass] Detect and output error on authz token extraction (#12472) @@ -3669,7 +3681,7 @@ version 2017.03.02 Core + [adobepass] Add support for Charter Spectrum (#11465) -* [YoutubeDL] Don't sanitize identifiers in output template (#12317) +* [HaruhiDL] Don't sanitize identifiers in output template (#12317) Extractors * [facebook] Fix extraction (#12323, #12330) @@ -3736,7 +3748,7 @@ version 2017.02.24 Core * [options] Hide deprecated options from --help * [options] Deprecate --autonumber-size -+ [YoutubeDL] Add support for string formatting operations in output template ++ [HaruhiDL] Add support for string formatting operations in output template (#5185, #5748, #6841, #9929, #9966 #9978, #12189) Extractors @@ -3782,7 +3794,7 @@ Core + Add experimental geo restriction bypass mechanism based on faking X-Forwarded-For HTTP header + [utils] Introduce GeoRestrictedError for geo restricted videos -+ [utils] Introduce YoutubeDLError base class for all youtube-dl exceptions ++ [utils] Introduce HaruhiDLError base class for all haruhi-dl exceptions Extractors + [ninecninemedia] Use geo bypass mechanism @@ -4071,7 +4083,7 @@ version 2017.01.16 Core * [options] Apply custom config to final composite configuration (#11741) -* [YoutubeDL] Improve protocol auto determining (#11720) +* [HaruhiDL] Improve protocol auto determining (#11720) Extractors * [xiami] Relax URL regular expressions @@ -4422,7 +4434,7 @@ Extractors version 2016.10.25 Core -* Running youtube-dl in the background is fixed (#10996, #10706, #955) +* Running haruhi-dl in the background is fixed (#10996, #10706, #955) Extractors + [jamendo] Add support for jamendo.com (#10132, #10736) diff --git a/LICENSE b/LICENSE index 68a49daad..0a041280b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,24 +1,165 @@ -This is free and unencumbered software released into the public domain. + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. -For more information, please refer to + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/MANIFEST.in b/MANIFEST.in index 4e43e99f3..768cdc9c0 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,8 +2,8 @@ include README.md include LICENSE include AUTHORS include ChangeLog -include youtube-dl.bash-completion -include youtube-dl.fish -include youtube-dl.1 +include haruhi-dl.bash-completion +include haruhi-dl.fish +include haruhi-dl.1 recursive-include docs Makefile conf.py *.rst recursive-include test * diff --git a/Makefile b/Makefile index 3e17365b8..659eb893d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ -all: youtube-dl README.md CONTRIBUTING.md README.txt youtube-dl.1 youtube-dl.bash-completion youtube-dl.zsh youtube-dl.fish supportedsites +all: haruhi-dl haruhi-dl.1 haruhi-dl.bash-completion haruhi-dl.zsh haruhi-dl.fish supportedsites clean: - rm -rf youtube-dl.1.temp.md youtube-dl.1 youtube-dl.bash-completion README.txt MANIFEST build/ dist/ .coverage cover/ youtube-dl.tar.gz youtube-dl.zsh youtube-dl.fish youtube_dl/extractor/lazy_extractors.py *.dump *.part* *.ytdl *.info.json *.mp4 *.m4a *.flv *.mp3 *.avi *.mkv *.webm *.3gp *.wav *.ape *.swf *.jpg *.png CONTRIBUTING.md.tmp youtube-dl youtube-dl.exe + rm -rf haruhi-dl.1.temp.md haruhi-dl.1 haruhi-dl.bash-completion MANIFEST build/ dist/ .coverage cover/ haruhi-dl.tar.gz haruhi-dl.zsh haruhi-dl.fish haruhi_dl/extractor/lazy_extractors.py *.dump *.part* *.ytdl *.info.json *.mp4 *.m4a *.flv *.mp3 *.avi *.mkv *.webm *.3gp *.wav *.ape *.swf *.jpg *.png CONTRIBUTING.md.tmp haruhi-dl haruhi-dl.exe find . -name "*.pyc" -delete find . -name "*.class" -delete @@ -17,23 +17,23 @@ SYSCONFDIR = $(shell if [ $(PREFIX) = /usr -o $(PREFIX) = /usr/local ]; then ech # set markdown input format to "markdown-smart" for pandoc version 2 and to "markdown" for pandoc prior to version 2 MARKDOWN = $(shell if [ `pandoc -v | head -n1 | cut -d" " -f2 | head -c1` = "2" ]; then echo markdown-smart; else echo markdown; fi) -install: youtube-dl youtube-dl.1 youtube-dl.bash-completion youtube-dl.zsh youtube-dl.fish +install: haruhi-dl haruhi-dl.1 haruhi-dl.bash-completion haruhi-dl.zsh haruhi-dl.fish install -d $(DESTDIR)$(BINDIR) - install -m 755 youtube-dl $(DESTDIR)$(BINDIR) + install -m 755 haruhi-dl $(DESTDIR)$(BINDIR) install -d $(DESTDIR)$(MANDIR)/man1 - install -m 644 youtube-dl.1 $(DESTDIR)$(MANDIR)/man1 + install -m 644 haruhi-dl.1 $(DESTDIR)$(MANDIR)/man1 install -d $(DESTDIR)$(SYSCONFDIR)/bash_completion.d - install -m 644 youtube-dl.bash-completion $(DESTDIR)$(SYSCONFDIR)/bash_completion.d/youtube-dl + install -m 644 haruhi-dl.bash-completion $(DESTDIR)$(SYSCONFDIR)/bash_completion.d/haruhi-dl install -d $(DESTDIR)$(SHAREDIR)/zsh/site-functions - install -m 644 youtube-dl.zsh $(DESTDIR)$(SHAREDIR)/zsh/site-functions/_youtube-dl + install -m 644 haruhi-dl.zsh $(DESTDIR)$(SHAREDIR)/zsh/site-functions/_haruhi-dl install -d $(DESTDIR)$(SYSCONFDIR)/fish/completions - install -m 644 youtube-dl.fish $(DESTDIR)$(SYSCONFDIR)/fish/completions/youtube-dl.fish + install -m 644 haruhi-dl.fish $(DESTDIR)$(SYSCONFDIR)/fish/completions/haruhi-dl.fish codetest: flake8 . test: - #nosetests --with-coverage --cover-package=youtube_dl --cover-html --verbose --processes 4 test + #nosetests --with-coverage --cover-package=haruhi_dl --cover-html --verbose --processes 4 test nosetests --verbose test $(MAKE) codetest @@ -51,34 +51,34 @@ offlinetest: codetest --exclude test_youtube_lists.py \ --exclude test_youtube_signature.py -tar: youtube-dl.tar.gz +tar: haruhi-dl.tar.gz .PHONY: all clean install test tar bash-completion pypi-files zsh-completion fish-completion ot offlinetest codetest supportedsites -pypi-files: youtube-dl.bash-completion README.txt youtube-dl.1 youtube-dl.fish +pypi-files: haruhi-dl.bash-completion haruhi-dl.1 haruhi-dl.fish -youtube-dl: youtube_dl/*.py youtube_dl/*/*.py +haruhi-dl: haruhi_dl/*.py haruhi_dl/*/*.py mkdir -p zip - for d in youtube_dl youtube_dl/downloader youtube_dl/extractor youtube_dl/postprocessor ; do \ + for d in haruhi_dl haruhi_dl/downloader haruhi_dl/extractor haruhi_dl/postprocessor ; do \ mkdir -p zip/$$d ;\ cp -pPR $$d/*.py zip/$$d/ ;\ done - touch -t 200001010101 zip/youtube_dl/*.py zip/youtube_dl/*/*.py - mv zip/youtube_dl/__main__.py zip/ - cd zip ; zip -q ../youtube-dl youtube_dl/*.py youtube_dl/*/*.py __main__.py + touch -t 200001010101 zip/haruhi_dl/*.py zip/haruhi_dl/*/*.py + mv zip/haruhi_dl/__main__.py zip/ + cd zip ; zip -q ../haruhi-dl haruhi_dl/*.py haruhi_dl/*/*.py __main__.py rm -rf zip - echo '#!$(PYTHON)' > youtube-dl - cat youtube-dl.zip >> youtube-dl - rm youtube-dl.zip - chmod a+x youtube-dl + echo '#!$(PYTHON)' > haruhi-dl + cat haruhi-dl.zip >> haruhi-dl + rm haruhi-dl.zip + chmod a+x haruhi-dl -README.md: youtube_dl/*.py youtube_dl/*/*.py - COLUMNS=80 $(PYTHON) youtube_dl/__main__.py --help | $(PYTHON) devscripts/make_readme.py +#README.md: haruhi_dl/*.py haruhi_dl/*/*.py +# COLUMNS=80 $(PYTHON) haruhi_dl/__main__.py --help | $(PYTHON) devscripts/make_readme.py -CONTRIBUTING.md: README.md - $(PYTHON) devscripts/make_contributing.py README.md CONTRIBUTING.md +#CONTRIBUTING.md: README.md +# $(PYTHON) devscripts/make_contributing.py README.md CONTRIBUTING.md -issuetemplates: devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/1_broken_site.md .github/ISSUE_TEMPLATE_tmpl/2_site_support_request.md .github/ISSUE_TEMPLATE_tmpl/3_site_feature_request.md .github/ISSUE_TEMPLATE_tmpl/4_bug_report.md .github/ISSUE_TEMPLATE_tmpl/5_feature_request.md youtube_dl/version.py +issuetemplates: devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/1_broken_site.md .github/ISSUE_TEMPLATE_tmpl/2_site_support_request.md .github/ISSUE_TEMPLATE_tmpl/3_site_feature_request.md .github/ISSUE_TEMPLATE_tmpl/4_bug_report.md .github/ISSUE_TEMPLATE_tmpl/5_feature_request.md haruhi_dl/version.py $(PYTHON) devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/1_broken_site.md .github/ISSUE_TEMPLATE/1_broken_site.md $(PYTHON) devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/2_site_support_request.md .github/ISSUE_TEMPLATE/2_site_support_request.md $(PYTHON) devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/3_site_feature_request.md .github/ISSUE_TEMPLATE/3_site_feature_request.md @@ -88,37 +88,37 @@ issuetemplates: devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/1_ supportedsites: $(PYTHON) devscripts/make_supportedsites.py docs/supportedsites.md -README.txt: README.md - pandoc -f $(MARKDOWN) -t plain README.md -o README.txt +#README.txt: README.md +# pandoc -f $(MARKDOWN) -t plain README.md -o README.txt -youtube-dl.1: README.md - $(PYTHON) devscripts/prepare_manpage.py youtube-dl.1.temp.md - pandoc -s -f $(MARKDOWN) -t man youtube-dl.1.temp.md -o youtube-dl.1 - rm -f youtube-dl.1.temp.md +haruhi-dl.1: README.md + $(PYTHON) devscripts/prepare_manpage.py haruhi-dl.1.temp.md + pandoc -s -f $(MARKDOWN) -t man haruhi-dl.1.temp.md -o haruhi-dl.1 + rm -f haruhi-dl.1.temp.md -youtube-dl.bash-completion: youtube_dl/*.py youtube_dl/*/*.py devscripts/bash-completion.in +haruhi-dl.bash-completion: haruhi_dl/*.py haruhi_dl/*/*.py devscripts/bash-completion.in $(PYTHON) devscripts/bash-completion.py -bash-completion: youtube-dl.bash-completion +bash-completion: haruhi-dl.bash-completion -youtube-dl.zsh: youtube_dl/*.py youtube_dl/*/*.py devscripts/zsh-completion.in +haruhi-dl.zsh: haruhi_dl/*.py haruhi_dl/*/*.py devscripts/zsh-completion.in $(PYTHON) devscripts/zsh-completion.py -zsh-completion: youtube-dl.zsh +zsh-completion: haruhi-dl.zsh -youtube-dl.fish: youtube_dl/*.py youtube_dl/*/*.py devscripts/fish-completion.in +haruhi-dl.fish: haruhi_dl/*.py haruhi_dl/*/*.py devscripts/fish-completion.in $(PYTHON) devscripts/fish-completion.py -fish-completion: youtube-dl.fish +fish-completion: haruhi-dl.fish -lazy-extractors: youtube_dl/extractor/lazy_extractors.py +lazy-extractors: haruhi_dl/extractor/lazy_extractors.py -_EXTRACTOR_FILES = $(shell find youtube_dl/extractor -iname '*.py' -and -not -iname 'lazy_extractors.py') -youtube_dl/extractor/lazy_extractors.py: devscripts/make_lazy_extractors.py devscripts/lazy_load_template.py $(_EXTRACTOR_FILES) +_EXTRACTOR_FILES = $(shell find haruhi_dl/extractor -iname '*.py' -and -not -iname 'lazy_extractors.py') +haruhi_dl/extractor/lazy_extractors.py: devscripts/make_lazy_extractors.py devscripts/lazy_load_template.py $(_EXTRACTOR_FILES) $(PYTHON) devscripts/make_lazy_extractors.py $@ -youtube-dl.tar.gz: youtube-dl README.md README.txt youtube-dl.1 youtube-dl.bash-completion youtube-dl.zsh youtube-dl.fish ChangeLog AUTHORS - @tar -czf youtube-dl.tar.gz --transform "s|^|youtube-dl/|" --owner 0 --group 0 \ +haruhi-dl.tar.gz: haruhi-dl haruhi-dl.1 haruhi-dl.bash-completion haruhi-dl.zsh haruhi-dl.fish ChangeLog AUTHORS + @tar -czf haruhi-dl.tar.gz --transform "s|^|haruhi-dl/|" --owner 0 --group 0 \ --exclude '*.DS_Store' \ --exclude '*.kate-swp' \ --exclude '*.pyc' \ @@ -128,8 +128,8 @@ youtube-dl.tar.gz: youtube-dl README.md README.txt youtube-dl.1 youtube-dl.bash- --exclude '.git' \ --exclude 'docs/_build' \ -- \ - bin devscripts test youtube_dl docs \ - ChangeLog AUTHORS LICENSE README.md README.txt \ - Makefile MANIFEST.in youtube-dl.1 youtube-dl.bash-completion \ - youtube-dl.zsh youtube-dl.fish setup.py setup.cfg \ - youtube-dl + bin devscripts test haruhi_dl docs \ + ChangeLog AUTHORS LICENSE \ + Makefile MANIFEST.in haruhi-dl.1 haruhi-dl.bash-completion \ + haruhi-dl.zsh haruhi-dl.fish setup.py setup.cfg \ + haruhi-dl diff --git a/README.md b/README.md index cd8856828..2e2922b1e 100644 --- a/README.md +++ b/README.md @@ -1,1446 +1,5 @@ -[![Build Status](https://travis-ci.org/ytdl-org/youtube-dl.svg?branch=master)](https://travis-ci.org/ytdl-org/youtube-dl) +# Haruhi-DL -youtube-dl - download videos from youtube.com or other video platforms +This is a fork of [youtube-dl](https://yt-dl.org/), focused on bringing a fast, steady stream of updates. We'll do our best to merge patches to any site, not only youtube. -- [INSTALLATION](#installation) -- [DESCRIPTION](#description) -- [OPTIONS](#options) -- [CONFIGURATION](#configuration) -- [OUTPUT TEMPLATE](#output-template) -- [FORMAT SELECTION](#format-selection) -- [VIDEO SELECTION](#video-selection) -- [FAQ](#faq) -- [DEVELOPER INSTRUCTIONS](#developer-instructions) -- [EMBEDDING YOUTUBE-DL](#embedding-youtube-dl) -- [BUGS](#bugs) -- [COPYRIGHT](#copyright) - -# INSTALLATION - -To install it right away for all UNIX users (Linux, macOS, etc.), type: - - sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl - sudo chmod a+rx /usr/local/bin/youtube-dl - -If you do not have curl, you can alternatively use a recent wget: - - sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl - sudo chmod a+rx /usr/local/bin/youtube-dl - -Windows users can [download an .exe file](https://yt-dl.org/latest/youtube-dl.exe) and place it in any location on their [PATH](https://en.wikipedia.org/wiki/PATH_%28variable%29) except for `%SYSTEMROOT%\System32` (e.g. **do not** put in `C:\Windows\System32`). - -You can also use pip: - - sudo -H pip install --upgrade youtube-dl - -This command will update youtube-dl if you have already installed it. See the [pypi page](https://pypi.python.org/pypi/youtube_dl) for more information. - -macOS users can install youtube-dl with [Homebrew](https://brew.sh/): - - brew install youtube-dl - -Or with [MacPorts](https://www.macports.org/): - - sudo port install youtube-dl - -Alternatively, refer to the [developer instructions](#developer-instructions) for how to check out and work with the git repository. For further options, including PGP signatures, see the [youtube-dl Download Page](https://ytdl-org.github.io/youtube-dl/download.html). - -# DESCRIPTION -**youtube-dl** is a command-line program to download videos from YouTube.com and a few more sites. It requires the Python interpreter, version 2.6, 2.7, or 3.2+, and it is not platform specific. It should work on your Unix box, on Windows or on macOS. It is released to the public domain, which means you can modify it, redistribute it or use it however you like. - - youtube-dl [OPTIONS] URL [URL...] - -# OPTIONS - -h, --help Print this help text and exit - --version Print program version and exit - -U, --update Update this program to latest version. Make - sure that you have sufficient permissions - (run with sudo if needed) - -i, --ignore-errors Continue on download errors, for example to - skip unavailable videos in a playlist - --abort-on-error Abort downloading of further videos (in the - playlist or the command line) if an error - occurs - --dump-user-agent Display the current browser identification - --list-extractors List all supported extractors - --extractor-descriptions Output descriptions of all supported - extractors - --force-generic-extractor Force extraction to use the generic - extractor - --default-search PREFIX Use this prefix for unqualified URLs. For - example "gvsearch2:" downloads two videos - from google videos for youtube-dl "large - apple". Use the value "auto" to let - youtube-dl guess ("auto_warning" to emit a - warning when guessing). "error" just throws - an error. The default value "fixup_error" - repairs broken URLs, but emits an error if - this is not possible instead of searching. - --ignore-config Do not read configuration files. When given - in the global configuration file - /etc/youtube-dl.conf: Do not read the user - configuration in ~/.config/youtube- - dl/config (%APPDATA%/youtube-dl/config.txt - on Windows) - --config-location PATH Location of the configuration file; either - the path to the config or its containing - directory. - --flat-playlist Do not extract the videos of a playlist, - only list them. - --mark-watched Mark videos watched (YouTube only) - --no-mark-watched Do not mark videos watched (YouTube only) - --no-color Do not emit color codes in output - -## Network Options: - --proxy URL Use the specified HTTP/HTTPS/SOCKS proxy. - To enable SOCKS proxy, specify a proper - scheme. For example - socks5://127.0.0.1:1080/. Pass in an empty - string (--proxy "") for direct connection - --socket-timeout SECONDS Time to wait before giving up, in seconds - --source-address IP Client-side IP address to bind to - -4, --force-ipv4 Make all connections via IPv4 - -6, --force-ipv6 Make all connections via IPv6 - -## Geo Restriction: - --geo-verification-proxy URL Use this proxy to verify the IP address for - some geo-restricted sites. The default - proxy specified by --proxy (or none, if the - option is not present) is used for the - actual downloading. - --geo-bypass Bypass geographic restriction via faking - X-Forwarded-For HTTP header - --no-geo-bypass Do not bypass geographic restriction via - faking X-Forwarded-For HTTP header - --geo-bypass-country CODE Force bypass geographic restriction with - explicitly provided two-letter ISO 3166-2 - country code - --geo-bypass-ip-block IP_BLOCK Force bypass geographic restriction with - explicitly provided IP block in CIDR - notation - -## Video Selection: - --playlist-start NUMBER Playlist video to start at (default is 1) - --playlist-end NUMBER Playlist video to end at (default is last) - --playlist-items ITEM_SPEC Playlist video items to download. Specify - indices of the videos in the playlist - separated by commas like: "--playlist-items - 1,2,5,8" if you want to download videos - indexed 1, 2, 5, 8 in the playlist. You can - specify range: "--playlist-items - 1-3,7,10-13", it will download the videos - at index 1, 2, 3, 7, 10, 11, 12 and 13. - --match-title REGEX Download only matching titles (regex or - caseless sub-string) - --reject-title REGEX Skip download for matching titles (regex or - caseless sub-string) - --max-downloads NUMBER Abort after downloading NUMBER files - --min-filesize SIZE Do not download any videos smaller than - SIZE (e.g. 50k or 44.6m) - --max-filesize SIZE Do not download any videos larger than SIZE - (e.g. 50k or 44.6m) - --date DATE Download only videos uploaded in this date - --datebefore DATE Download only videos uploaded on or before - this date (i.e. inclusive) - --dateafter DATE Download only videos uploaded on or after - this date (i.e. inclusive) - --min-views COUNT Do not download any videos with less than - COUNT views - --max-views COUNT Do not download any videos with more than - COUNT views - --match-filter FILTER Generic video filter. Specify any key (see - the "OUTPUT TEMPLATE" for a list of - available keys) to match if the key is - present, !key to check if the key is not - present, key > NUMBER (like "comment_count - > 12", also works with >=, <, <=, !=, =) to - compare against a number, key = 'LITERAL' - (like "uploader = 'Mike Smith'", also works - with !=) to match against a string literal - and & to require multiple matches. Values - which are not known are excluded unless you - put a question mark (?) after the operator. - For example, to only match videos that have - been liked more than 100 times and disliked - less than 50 times (or the dislike - functionality is not available at the given - service), but who also have a description, - use --match-filter "like_count > 100 & - dislike_count .+?) - (?P.+)" - --xattrs Write metadata to the video file's xattrs - (using dublin core and xdg standards) - --fixup POLICY Automatically correct known faults of the - file. One of never (do nothing), warn (only - emit a warning), detect_or_warn (the - default; fix file if we can, warn - otherwise) - --prefer-avconv Prefer avconv over ffmpeg for running the - postprocessors - --prefer-ffmpeg Prefer ffmpeg over avconv for running the - postprocessors (default) - --ffmpeg-location PATH Location of the ffmpeg/avconv binary; - either the path to the binary or its - containing directory. - --exec CMD Execute a command on the file after - downloading and post-processing, similar to - find's -exec syntax. Example: --exec 'adb - push {} /sdcard/Music/ && rm {}' - --convert-subs FORMAT Convert the subtitles to other format - (currently supported: srt|ass|vtt|lrc) - -# CONFIGURATION - -You can configure youtube-dl by placing any supported command line option to a configuration file. On Linux and macOS, the system wide configuration file is located at `/etc/youtube-dl.conf` and the user wide configuration file at `~/.config/youtube-dl/config`. On Windows, the user wide configuration file locations are `%APPDATA%\youtube-dl\config.txt` or `C:\Users\<user name>\youtube-dl.conf`. Note that by default configuration file may not exist so you may need to create it yourself. - -For example, with the following configuration file youtube-dl will always extract the audio, not copy the mtime, use a proxy and save all videos under `Movies` directory in your home directory: -``` -# Lines starting with # are comments - -# Always extract audio --x - -# Do not copy the mtime ---no-mtime - -# Use this proxy ---proxy 127.0.0.1:3128 - -# Save all videos under Movies directory in your home directory --o ~/Movies/%(title)s.%(ext)s -``` - -Note that options in configuration file are just the same options aka switches used in regular command line calls thus there **must be no whitespace** after `-` or `--`, e.g. `-o` or `--proxy` but not `- o` or `-- proxy`. - -You can use `--ignore-config` if you want to disable the configuration file for a particular youtube-dl run. - -You can also use `--config-location` if you want to use custom configuration file for a particular youtube-dl run. - -### Authentication with `.netrc` file - -You may also want to configure automatic credentials storage for extractors that support authentication (by providing login and password with `--username` and `--password`) in order not to pass credentials as command line arguments on every youtube-dl execution and prevent tracking plain text passwords in the shell command history. You can achieve this using a [`.netrc` file](https://stackoverflow.com/tags/.netrc/info) on a per extractor basis. For that you will need to create a `.netrc` file in your `$HOME` and restrict permissions to read/write by only you: -``` -touch $HOME/.netrc -chmod a-rwx,u+rw $HOME/.netrc -``` -After that you can add credentials for an extractor in the following format, where *extractor* is the name of the extractor in lowercase: -``` -machine <extractor> login <login> password <password> -``` -For example: -``` -machine youtube login myaccount@gmail.com password my_youtube_password -machine twitch login my_twitch_account_name password my_twitch_password -``` -To activate authentication with the `.netrc` file you should pass `--netrc` to youtube-dl or place it in the [configuration file](#configuration). - -On Windows you may also need to setup the `%HOME%` environment variable manually. For example: -``` -set HOME=%USERPROFILE% -``` - -# OUTPUT TEMPLATE - -The `-o` option allows users to indicate a template for the output file names. - -**tl;dr:** [navigate me to examples](#output-template-examples). - -The basic usage is not to set any template arguments when downloading a single file, like in `youtube-dl -o funny_video.flv "https://some/video"`. However, it may contain special sequences that will be replaced when downloading each video. The special sequences may be formatted according to [python string formatting operations](https://docs.python.org/2/library/stdtypes.html#string-formatting). For example, `%(NAME)s` or `%(NAME)05d`. To clarify, that is a percent symbol followed by a name in parentheses, followed by formatting operations. Allowed names along with sequence type are: - - - `id` (string): Video identifier - - `title` (string): Video title - - `url` (string): Video URL - - `ext` (string): Video filename extension - - `alt_title` (string): A secondary title of the video - - `display_id` (string): An alternative identifier for the video - - `uploader` (string): Full name of the video uploader - - `license` (string): License name the video is licensed under - - `creator` (string): The creator of the video - - `release_date` (string): The date (YYYYMMDD) when the video was released - - `timestamp` (numeric): UNIX timestamp of the moment the video became available - - `upload_date` (string): Video upload date (YYYYMMDD) - - `uploader_id` (string): Nickname or id of the video uploader - - `channel` (string): Full name of the channel the video is uploaded on - - `channel_id` (string): Id of the channel - - `location` (string): Physical location where the video was filmed - - `duration` (numeric): Length of the video in seconds - - `view_count` (numeric): How many users have watched the video on the platform - - `like_count` (numeric): Number of positive ratings of the video - - `dislike_count` (numeric): Number of negative ratings of the video - - `repost_count` (numeric): Number of reposts of the video - - `average_rating` (numeric): Average rating give by users, the scale used depends on the webpage - - `comment_count` (numeric): Number of comments on the video - - `age_limit` (numeric): Age restriction for the video (years) - - `is_live` (boolean): Whether this video is a live stream or a fixed-length video - - `start_time` (numeric): Time in seconds where the reproduction should start, as specified in the URL - - `end_time` (numeric): Time in seconds where the reproduction should end, as specified in the URL - - `format` (string): A human-readable description of the format - - `format_id` (string): Format code specified by `--format` - - `format_note` (string): Additional info about the format - - `width` (numeric): Width of the video - - `height` (numeric): Height of the video - - `resolution` (string): Textual description of width and height - - `tbr` (numeric): Average bitrate of audio and video in KBit/s - - `abr` (numeric): Average audio bitrate in KBit/s - - `acodec` (string): Name of the audio codec in use - - `asr` (numeric): Audio sampling rate in Hertz - - `vbr` (numeric): Average video bitrate in KBit/s - - `fps` (numeric): Frame rate - - `vcodec` (string): Name of the video codec in use - - `container` (string): Name of the container format - - `filesize` (numeric): The number of bytes, if known in advance - - `filesize_approx` (numeric): An estimate for the number of bytes - - `protocol` (string): The protocol that will be used for the actual download - - `extractor` (string): Name of the extractor - - `extractor_key` (string): Key name of the extractor - - `epoch` (numeric): Unix epoch when creating the file - - `autonumber` (numeric): Number that will be increased with each download, starting at `--autonumber-start` - - `playlist` (string): Name or id of the playlist that contains the video - - `playlist_index` (numeric): Index of the video in the playlist padded with leading zeros according to the total length of the playlist - - `playlist_id` (string): Playlist identifier - - `playlist_title` (string): Playlist title - - `playlist_uploader` (string): Full name of the playlist uploader - - `playlist_uploader_id` (string): Nickname or id of the playlist uploader - -Available for the video that belongs to some logical chapter or section: - - - `chapter` (string): Name or title of the chapter the video belongs to - - `chapter_number` (numeric): Number of the chapter the video belongs to - - `chapter_id` (string): Id of the chapter the video belongs to - -Available for the video that is an episode of some series or programme: - - - `series` (string): Title of the series or programme the video episode belongs to - - `season` (string): Title of the season the video episode belongs to - - `season_number` (numeric): Number of the season the video episode belongs to - - `season_id` (string): Id of the season the video episode belongs to - - `episode` (string): Title of the video episode - - `episode_number` (numeric): Number of the video episode within a season - - `episode_id` (string): Id of the video episode - -Available for the media that is a track or a part of a music album: - - - `track` (string): Title of the track - - `track_number` (numeric): Number of the track within an album or a disc - - `track_id` (string): Id of the track - - `artist` (string): Artist(s) of the track - - `genre` (string): Genre(s) of the track - - `album` (string): Title of the album the track belongs to - - `album_type` (string): Type of the album - - `album_artist` (string): List of all artists appeared on the album - - `disc_number` (numeric): Number of the disc or other physical medium the track belongs to - - `release_year` (numeric): Year (YYYY) when the album was released - -Each aforementioned sequence when referenced in an output template will be replaced by the actual value corresponding to the sequence name. Note that some of the sequences are not guaranteed to be present since they depend on the metadata obtained by a particular extractor. Such sequences will be replaced with `NA`. - -For example for `-o %(title)s-%(id)s.%(ext)s` and an mp4 video with title `youtube-dl test video` and id `BaW_jenozKcj`, this will result in a `youtube-dl test video-BaW_jenozKcj.mp4` file created in the current directory. - -For numeric sequences you can use numeric related formatting, for example, `%(view_count)05d` will result in a string with view count padded with zeros up to 5 characters, like in `00042`. - -Output templates can also contain arbitrary hierarchical path, e.g. `-o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s'` which will result in downloading each video in a directory corresponding to this path template. Any missing directory will be automatically created for you. - -To use percent literals in an output template use `%%`. To output to stdout use `-o -`. - -The current default template is `%(title)s-%(id)s.%(ext)s`. - -In some cases, you don't want special characters such as 中, spaces, or &, such as when transferring the downloaded filename to a Windows system or the filename through an 8bit-unsafe channel. In these cases, add the `--restrict-filenames` flag to get a shorter title: - -#### Output template and Windows batch files - -If you are using an output template inside a Windows batch file then you must escape plain percent characters (`%`) by doubling, so that `-o "%(title)s-%(id)s.%(ext)s"` should become `-o "%%(title)s-%%(id)s.%%(ext)s"`. However you should not touch `%`'s that are not plain characters, e.g. environment variables for expansion should stay intact: `-o "C:\%HOMEPATH%\Desktop\%%(title)s.%%(ext)s"`. - -#### Output template examples - -Note that on Windows you may need to use double quotes instead of single. - -```bash -$ youtube-dl --get-filename -o '%(title)s.%(ext)s' BaW_jenozKc -youtube-dl test video ''_ä↭𝕐.mp4 # All kinds of weird characters - -$ youtube-dl --get-filename -o '%(title)s.%(ext)s' BaW_jenozKc --restrict-filenames -youtube-dl_test_video_.mp4 # A simple file name - -# Download YouTube playlist videos in separate directory indexed by video order in a playlist -$ youtube-dl -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re - -# Download all playlists of YouTube channel/user keeping each playlist in separate directory: -$ youtube-dl -o '%(uploader)s/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' https://www.youtube.com/user/TheLinuxFoundation/playlists - -# Download Udemy course keeping each chapter in separate directory under MyVideos directory in your home -$ youtube-dl -u user -p password -o '~/MyVideos/%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s' https://www.udemy.com/java-tutorial/ - -# Download entire series season keeping each series and each season in separate directory under C:/MyVideos -$ youtube-dl -o "C:/MyVideos/%(series)s/%(season_number)s - %(season)s/%(episode_number)s - %(episode)s.%(ext)s" https://videomore.ru/kino_v_detalayah/5_sezon/367617 - -# Stream the video being downloaded to stdout -$ youtube-dl -o - BaW_jenozKc -``` - -# FORMAT SELECTION - -By default youtube-dl tries to download the best available quality, i.e. if you want the best quality you **don't need** to pass any special options, youtube-dl will guess it for you by **default**. - -But sometimes you may want to download in a different format, for example when you are on a slow or intermittent connection. The key mechanism for achieving this is so-called *format selection* based on which you can explicitly specify desired format, select formats based on some criterion or criteria, setup precedence and much more. - -The general syntax for format selection is `--format FORMAT` or shorter `-f FORMAT` where `FORMAT` is a *selector expression*, i.e. an expression that describes format or formats you would like to download. - -**tl;dr:** [navigate me to examples](#format-selection-examples). - -The simplest case is requesting a specific format, for example with `-f 22` you can download the format with format code equal to 22. You can get the list of available format codes for particular video using `--list-formats` or `-F`. Note that these format codes are extractor specific. - -You can also use a file extension (currently `3gp`, `aac`, `flv`, `m4a`, `mp3`, `mp4`, `ogg`, `wav`, `webm` are supported) to download the best quality format of a particular file extension served as a single file, e.g. `-f webm` will download the best quality format with the `webm` extension served as a single file. - -You can also use special names to select particular edge case formats: - - - `best`: Select the best quality format represented by a single file with video and audio. - - `worst`: Select the worst quality format represented by a single file with video and audio. - - `bestvideo`: Select the best quality video-only format (e.g. DASH video). May not be available. - - `worstvideo`: Select the worst quality video-only format. May not be available. - - `bestaudio`: Select the best quality audio only-format. May not be available. - - `worstaudio`: Select the worst quality audio only-format. May not be available. - -For example, to download the worst quality video-only format you can use `-f worstvideo`. - -If you want to download multiple videos and they don't have the same formats available, you can specify the order of preference using slashes. Note that slash is left-associative, i.e. formats on the left hand side are preferred, for example `-f 22/17/18` will download format 22 if it's available, otherwise it will download format 17 if it's available, otherwise it will download format 18 if it's available, otherwise it will complain that no suitable formats are available for download. - -If you want to download several formats of the same video use a comma as a separator, e.g. `-f 22,17,18` will download all these three formats, of course if they are available. Or a more sophisticated example combined with the precedence feature: `-f 136/137/mp4/bestvideo,140/m4a/bestaudio`. - -You can also filter the video formats by putting a condition in brackets, as in `-f "best[height=720]"` (or `-f "[filesize>10M]"`). - -The following numeric meta fields can be used with comparisons `<`, `<=`, `>`, `>=`, `=` (equals), `!=` (not equals): - - - `filesize`: The number of bytes, if known in advance - - `width`: Width of the video, if known - - `height`: Height of the video, if known - - `tbr`: Average bitrate of audio and video in KBit/s - - `abr`: Average audio bitrate in KBit/s - - `vbr`: Average video bitrate in KBit/s - - `asr`: Audio sampling rate in Hertz - - `fps`: Frame rate - -Also filtering work for comparisons `=` (equals), `^=` (starts with), `$=` (ends with), `*=` (contains) and following string meta fields: - - - `ext`: File extension - - `acodec`: Name of the audio codec in use - - `vcodec`: Name of the video codec in use - - `container`: Name of the container format - - `protocol`: The protocol that will be used for the actual download, lower-case (`http`, `https`, `rtsp`, `rtmp`, `rtmpe`, `mms`, `f4m`, `ism`, `http_dash_segments`, `m3u8`, or `m3u8_native`) - - `format_id`: A short description of the format - -Any string comparison may be prefixed with negation `!` in order to produce an opposite comparison, e.g. `!*=` (does not contain). - -Note that none of the aforementioned meta fields are guaranteed to be present since this solely depends on the metadata obtained by particular extractor, i.e. the metadata offered by the video hoster. - -Formats for which the value is not known are excluded unless you put a question mark (`?`) after the operator. You can combine format filters, so `-f "[height <=? 720][tbr>500]"` selects up to 720p videos (or videos where the height is not known) with a bitrate of at least 500 KBit/s. - -You can merge the video and audio of two formats into a single file using `-f <video-format>+<audio-format>` (requires ffmpeg or avconv installed), for example `-f bestvideo+bestaudio` will download the best video-only format, the best audio-only format and mux them together with ffmpeg/avconv. - -Format selectors can also be grouped using parentheses, for example if you want to download the best mp4 and webm formats with a height lower than 480 you can use `-f '(mp4,webm)[height<480]'`. - -Since the end of April 2015 and version 2015.04.26, youtube-dl uses `-f bestvideo+bestaudio/best` as the default format selection (see [#5447](https://github.com/ytdl-org/youtube-dl/issues/5447), [#5456](https://github.com/ytdl-org/youtube-dl/issues/5456)). If ffmpeg or avconv are installed this results in downloading `bestvideo` and `bestaudio` separately and muxing them together into a single file giving the best overall quality available. Otherwise it falls back to `best` and results in downloading the best available quality served as a single file. `best` is also needed for videos that don't come from YouTube because they don't provide the audio and video in two different files. If you want to only download some DASH formats (for example if you are not interested in getting videos with a resolution higher than 1080p), you can add `-f bestvideo[height<=?1080]+bestaudio/best` to your configuration file. Note that if you use youtube-dl to stream to `stdout` (and most likely to pipe it to your media player then), i.e. you explicitly specify output template as `-o -`, youtube-dl still uses `-f best` format selection in order to start content delivery immediately to your player and not to wait until `bestvideo` and `bestaudio` are downloaded and muxed. - -If you want to preserve the old format selection behavior (prior to youtube-dl 2015.04.26), i.e. you want to download the best available quality media served as a single file, you should explicitly specify your choice with `-f best`. You may want to add it to the [configuration file](#configuration) in order not to type it every time you run youtube-dl. - -#### Format selection examples - -Note that on Windows you may need to use double quotes instead of single. - -```bash -# Download best mp4 format available or any other best if no mp4 available -$ youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' - -# Download best format available but no better than 480p -$ youtube-dl -f 'bestvideo[height<=480]+bestaudio/best[height<=480]' - -# Download best video only format but no bigger than 50 MB -$ youtube-dl -f 'best[filesize<50M]' - -# Download best format available via direct link over HTTP/HTTPS protocol -$ youtube-dl -f '(bestvideo+bestaudio/best)[protocol^=http]' - -# Download the best video format and the best audio format without merging them -$ youtube-dl -f 'bestvideo,bestaudio' -o '%(title)s.f%(format_id)s.%(ext)s' -``` -Note that in the last example, an output template is recommended as bestvideo and bestaudio may have the same file name. - - -# VIDEO SELECTION - -Videos can be filtered by their upload date using the options `--date`, `--datebefore` or `--dateafter`. They accept dates in two formats: - - - Absolute dates: Dates in the format `YYYYMMDD`. - - Relative dates: Dates in the format `(now|today)[+-][0-9](day|week|month|year)(s)?` - -Examples: - -```bash -# Download only the videos uploaded in the last 6 months -$ youtube-dl --dateafter now-6months - -# Download only the videos uploaded on January 1, 1970 -$ youtube-dl --date 19700101 - -$ # Download only the videos uploaded in the 200x decade -$ youtube-dl --dateafter 20000101 --datebefore 20091231 -``` - -# FAQ - -### How do I update youtube-dl? - -If you've followed [our manual installation instructions](https://ytdl-org.github.io/youtube-dl/download.html), you can simply run `youtube-dl -U` (or, on Linux, `sudo youtube-dl -U`). - -If you have used pip, a simple `sudo pip install -U youtube-dl` is sufficient to update. - -If you have installed youtube-dl using a package manager like *apt-get* or *yum*, use the standard system update mechanism to update. Note that distribution packages are often outdated. As a rule of thumb, youtube-dl releases at least once a month, and often weekly or even daily. Simply go to https://yt-dl.org to find out the current version. Unfortunately, there is nothing we youtube-dl developers can do if your distribution serves a really outdated version. You can (and should) complain to your distribution in their bugtracker or support forum. - -As a last resort, you can also uninstall the version installed by your package manager and follow our manual installation instructions. For that, remove the distribution's package, with a line like - - sudo apt-get remove -y youtube-dl - -Afterwards, simply follow [our manual installation instructions](https://ytdl-org.github.io/youtube-dl/download.html): - -``` -sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl -sudo chmod a+rx /usr/local/bin/youtube-dl -hash -r -``` - -Again, from then on you'll be able to update with `sudo youtube-dl -U`. - -### youtube-dl is extremely slow to start on Windows - -Add a file exclusion for `youtube-dl.exe` in Windows Defender settings. - -### I'm getting an error `Unable to extract OpenGraph title` on YouTube playlists - -YouTube changed their playlist format in March 2014 and later on, so you'll need at least youtube-dl 2014.07.25 to download all YouTube videos. - -If you have installed youtube-dl with a package manager, pip, setup.py or a tarball, please use that to update. Note that Ubuntu packages do not seem to get updated anymore. Since we are not affiliated with Ubuntu, there is little we can do. Feel free to [report bugs](https://bugs.launchpad.net/ubuntu/+source/youtube-dl/+filebug) to the [Ubuntu packaging people](mailto:ubuntu-motu@lists.ubuntu.com?subject=outdated%20version%20of%20youtube-dl) - all they have to do is update the package to a somewhat recent version. See above for a way to update. - -### I'm getting an error when trying to use output template: `error: using output template conflicts with using title, video ID or auto number` - -Make sure you are not using `-o` with any of these options `-t`, `--title`, `--id`, `-A` or `--auto-number` set in command line or in a configuration file. Remove the latter if any. - -### Do I always have to pass `-citw`? - -By default, youtube-dl intends to have the best options (incidentally, if you have a convincing case that these should be different, [please file an issue where you explain that](https://yt-dl.org/bug)). Therefore, it is unnecessary and sometimes harmful to copy long option strings from webpages. In particular, the only option out of `-citw` that is regularly useful is `-i`. - -### Can you please put the `-b` option back? - -Most people asking this question are not aware that youtube-dl now defaults to downloading the highest available quality as reported by YouTube, which will be 1080p or 720p in some cases, so you no longer need the `-b` option. For some specific videos, maybe YouTube does not report them to be available in a specific high quality format you're interested in. In that case, simply request it with the `-f` option and youtube-dl will try to download it. - -### I get HTTP error 402 when trying to download a video. What's this? - -Apparently YouTube requires you to pass a CAPTCHA test if you download too much. We're [considering to provide a way to let you solve the CAPTCHA](https://github.com/ytdl-org/youtube-dl/issues/154), but at the moment, your best course of action is pointing a web browser to the youtube URL, solving the CAPTCHA, and restart youtube-dl. - -### Do I need any other programs? - -youtube-dl works fine on its own on most sites. However, if you want to convert video/audio, you'll need [avconv](https://libav.org/) or [ffmpeg](https://www.ffmpeg.org/). On some sites - most notably YouTube - videos can be retrieved in a higher quality format without sound. youtube-dl will detect whether avconv/ffmpeg is present and automatically pick the best option. - -Videos or video formats streamed via RTMP protocol can only be downloaded when [rtmpdump](https://rtmpdump.mplayerhq.hu/) is installed. Downloading MMS and RTSP videos requires either [mplayer](https://mplayerhq.hu/) or [mpv](https://mpv.io/) to be installed. - -### I have downloaded a video but how can I play it? - -Once the video is fully downloaded, use any video player, such as [mpv](https://mpv.io/), [vlc](https://www.videolan.org/) or [mplayer](https://www.mplayerhq.hu/). - -### I extracted a video URL with `-g`, but it does not play on another machine / in my web browser. - -It depends a lot on the service. In many cases, requests for the video (to download/play it) must come from the same IP address and with the same cookies and/or HTTP headers. Use the `--cookies` option to write the required cookies into a file, and advise your downloader to read cookies from that file. Some sites also require a common user agent to be used, use `--dump-user-agent` to see the one in use by youtube-dl. You can also get necessary cookies and HTTP headers from JSON output obtained with `--dump-json`. - -It may be beneficial to use IPv6; in some cases, the restrictions are only applied to IPv4. Some services (sometimes only for a subset of videos) do not restrict the video URL by IP address, cookie, or user-agent, but these are the exception rather than the rule. - -Please bear in mind that some URL protocols are **not** supported by browsers out of the box, including RTMP. If you are using `-g`, your own downloader must support these as well. - -If you want to play the video on a machine that is not running youtube-dl, you can relay the video content from the machine that runs youtube-dl. You can use `-o -` to let youtube-dl stream a video to stdout, or simply allow the player to download the files written by youtube-dl in turn. - -### ERROR: no fmt_url_map or conn information found in video info - -YouTube has switched to a new video info format in July 2011 which is not supported by old versions of youtube-dl. See [above](#how-do-i-update-youtube-dl) for how to update youtube-dl. - -### ERROR: unable to download video - -YouTube requires an additional signature since September 2012 which is not supported by old versions of youtube-dl. See [above](#how-do-i-update-youtube-dl) for how to update youtube-dl. - -### Video URL contains an ampersand and I'm getting some strange output `[1] 2839` or `'v' is not recognized as an internal or external command` - -That's actually the output from your shell. Since ampersand is one of the special shell characters it's interpreted by the shell preventing you from passing the whole URL to youtube-dl. To disable your shell from interpreting the ampersands (or any other special characters) you have to either put the whole URL in quotes or escape them with a backslash (which approach will work depends on your shell). - -For example if your URL is https://www.youtube.com/watch?t=4&v=BaW_jenozKc you should end up with following command: - -```youtube-dl 'https://www.youtube.com/watch?t=4&v=BaW_jenozKc'``` - -or - -```youtube-dl https://www.youtube.com/watch?t=4\&v=BaW_jenozKc``` - -For Windows you have to use the double quotes: - -```youtube-dl "https://www.youtube.com/watch?t=4&v=BaW_jenozKc"``` - -### ExtractorError: Could not find JS function u'OF' - -In February 2015, the new YouTube player contained a character sequence in a string that was misinterpreted by old versions of youtube-dl. See [above](#how-do-i-update-youtube-dl) for how to update youtube-dl. - -### HTTP Error 429: Too Many Requests or 402: Payment Required - -These two error codes indicate that the service is blocking your IP address because of overuse. Usually this is a soft block meaning that you can gain access again after solving CAPTCHA. Just open a browser and solve a CAPTCHA the service suggests you and after that [pass cookies](#how-do-i-pass-cookies-to-youtube-dl) to youtube-dl. Note that if your machine has multiple external IPs then you should also pass exactly the same IP you've used for solving CAPTCHA with [`--source-address`](#network-options). Also you may need to pass a `User-Agent` HTTP header of your browser with [`--user-agent`](#workarounds). - -If this is not the case (no CAPTCHA suggested to solve by the service) then you can contact the service and ask them to unblock your IP address, or - if you have acquired a whitelisted IP address already - use the [`--proxy` or `--source-address` options](#network-options) to select another IP address. - -### SyntaxError: Non-ASCII character - -The error - - File "youtube-dl", line 2 - SyntaxError: Non-ASCII character '\x93' ... - -means you're using an outdated version of Python. Please update to Python 2.6 or 2.7. - -### What is this binary file? Where has the code gone? - -Since June 2012 ([#342](https://github.com/ytdl-org/youtube-dl/issues/342)) youtube-dl is packed as an executable zipfile, simply unzip it (might need renaming to `youtube-dl.zip` first on some systems) or clone the git repository, as laid out above. If you modify the code, you can run it by executing the `__main__.py` file. To recompile the executable, run `make youtube-dl`. - -### The exe throws an error due to missing `MSVCR100.dll` - -To run the exe you need to install first the [Microsoft Visual C++ 2010 Redistributable Package (x86)](https://www.microsoft.com/en-US/download/details.aspx?id=5555). - -### On Windows, how should I set up ffmpeg and youtube-dl? Where should I put the exe files? - -If you put youtube-dl and ffmpeg in the same directory that you're running the command from, it will work, but that's rather cumbersome. - -To make a different directory work - either for ffmpeg, or for youtube-dl, or for both - simply create the directory (say, `C:\bin`, or `C:\Users\<User name>\bin`), put all the executables directly in there, and then [set your PATH environment variable](https://www.java.com/en/download/help/path.xml) to include that directory. - -From then on, after restarting your shell, you will be able to access both youtube-dl and ffmpeg (and youtube-dl will be able to find ffmpeg) by simply typing `youtube-dl` or `ffmpeg`, no matter what directory you're in. - -### How do I put downloads into a specific folder? - -Use the `-o` to specify an [output template](#output-template), for example `-o "/home/user/videos/%(title)s-%(id)s.%(ext)s"`. If you want this for all of your downloads, put the option into your [configuration file](#configuration). - -### How do I download a video starting with a `-`? - -Either prepend `https://www.youtube.com/watch?v=` or separate the ID from the options with `--`: - - youtube-dl -- -wNyEUrxzFU - youtube-dl "https://www.youtube.com/watch?v=-wNyEUrxzFU" - -### How do I pass cookies to youtube-dl? - -Use the `--cookies` option, for example `--cookies /path/to/cookies/file.txt`. - -In order to extract cookies from browser use any conforming browser extension for exporting cookies. For example, [cookies.txt](https://chrome.google.com/webstore/detail/cookiestxt/njabckikapfpffapmjgojcnbfjonfjfg) (for Chrome) or [cookies.txt](https://addons.mozilla.org/en-US/firefox/addon/cookies-txt/) (for Firefox). - -Note that the cookies file must be in Mozilla/Netscape format and the first line of the cookies file must be either `# HTTP Cookie File` or `# Netscape HTTP Cookie File`. Make sure you have correct [newline format](https://en.wikipedia.org/wiki/Newline) in the cookies file and convert newlines if necessary to correspond with your OS, namely `CRLF` (`\r\n`) for Windows and `LF` (`\n`) for Unix and Unix-like systems (Linux, macOS, etc.). `HTTP Error 400: Bad Request` when using `--cookies` is a good sign of invalid newline format. - -Passing cookies to youtube-dl is a good way to workaround login when a particular extractor does not implement it explicitly. Another use case is working around [CAPTCHA](https://en.wikipedia.org/wiki/CAPTCHA) some websites require you to solve in particular cases in order to get access (e.g. YouTube, CloudFlare). - -### How do I stream directly to media player? - -You will first need to tell youtube-dl to stream media to stdout with `-o -`, and also tell your media player to read from stdin (it must be capable of this for streaming) and then pipe former to latter. For example, streaming to [vlc](https://www.videolan.org/) can be achieved with: - - youtube-dl -o - "https://www.youtube.com/watch?v=BaW_jenozKcj" | vlc - - -### How do I download only new videos from a playlist? - -Use download-archive feature. With this feature you should initially download the complete playlist with `--download-archive /path/to/download/archive/file.txt` that will record identifiers of all the videos in a special file. Each subsequent run with the same `--download-archive` will download only new videos and skip all videos that have been downloaded before. Note that only successful downloads are recorded in the file. - -For example, at first, - - youtube-dl --download-archive archive.txt "https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re" - -will download the complete `PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re` playlist and create a file `archive.txt`. Each subsequent run will only download new videos if any: - - youtube-dl --download-archive archive.txt "https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re" - -### Should I add `--hls-prefer-native` into my config? - -When youtube-dl detects an HLS video, it can download it either with the built-in downloader or ffmpeg. Since many HLS streams are slightly invalid and ffmpeg/youtube-dl each handle some invalid cases better than the other, there is an option to switch the downloader if needed. - -When youtube-dl knows that one particular downloader works better for a given website, that downloader will be picked. Otherwise, youtube-dl will pick the best downloader for general compatibility, which at the moment happens to be ffmpeg. This choice may change in future versions of youtube-dl, with improvements of the built-in downloader and/or ffmpeg. - -In particular, the generic extractor (used when your website is not in the [list of supported sites by youtube-dl](https://ytdl-org.github.io/youtube-dl/supportedsites.html) cannot mandate one specific downloader. - -If you put either `--hls-prefer-native` or `--hls-prefer-ffmpeg` into your configuration, a different subset of videos will fail to download correctly. Instead, it is much better to [file an issue](https://yt-dl.org/bug) or a pull request which details why the native or the ffmpeg HLS downloader is a better choice for your use case. - -### Can you add support for this anime video site, or site which shows current movies for free? - -As a matter of policy (as well as legality), youtube-dl does not include support for services that specialize in infringing copyright. As a rule of thumb, if you cannot easily find a video that the service is quite obviously allowed to distribute (i.e. that has been uploaded by the creator, the creator's distributor, or is published under a free license), the service is probably unfit for inclusion to youtube-dl. - -A note on the service that they don't host the infringing content, but just link to those who do, is evidence that the service should **not** be included into youtube-dl. The same goes for any DMCA note when the whole front page of the service is filled with videos they are not allowed to distribute. A "fair use" note is equally unconvincing if the service shows copyright-protected videos in full without authorization. - -Support requests for services that **do** purchase the rights to distribute their content are perfectly fine though. If in doubt, you can simply include a source that mentions the legitimate purchase of content. - -### How can I speed up work on my issue? - -(Also known as: Help, my important issue not being solved!) The youtube-dl core developer team is quite small. While we do our best to solve as many issues as possible, sometimes that can take quite a while. To speed up your issue, here's what you can do: - -First of all, please do report the issue [at our issue tracker](https://yt-dl.org/bugs). That allows us to coordinate all efforts by users and developers, and serves as a unified point. Unfortunately, the youtube-dl project has grown too large to use personal email as an effective communication channel. - -Please read the [bug reporting instructions](#bugs) below. A lot of bugs lack all the necessary information. If you can, offer proxy, VPN, or shell access to the youtube-dl developers. If you are able to, test the issue from multiple computers in multiple countries to exclude local censorship or misconfiguration issues. - -If nobody is interested in solving your issue, you are welcome to take matters into your own hands and submit a pull request (or coerce/pay somebody else to do so). - -Feel free to bump the issue from time to time by writing a small comment ("Issue is still present in youtube-dl version ...from France, but fixed from Belgium"), but please not more than once a month. Please do not declare your issue as `important` or `urgent`. - -### How can I detect whether a given URL is supported by youtube-dl? - -For one, have a look at the [list of supported sites](docs/supportedsites.md). Note that it can sometimes happen that the site changes its URL scheme (say, from https://example.com/video/1234567 to https://example.com/v/1234567 ) and youtube-dl reports an URL of a service in that list as unsupported. In that case, simply report a bug. - -It is *not* possible to detect whether a URL is supported or not. That's because youtube-dl contains a generic extractor which matches **all** URLs. You may be tempted to disable, exclude, or remove the generic extractor, but the generic extractor not only allows users to extract videos from lots of websites that embed a video from another service, but may also be used to extract video from a service that it's hosting itself. Therefore, we neither recommend nor support disabling, excluding, or removing the generic extractor. - -If you want to find out whether a given URL is supported, simply call youtube-dl with it. If you get no videos back, chances are the URL is either not referring to a video or unsupported. You can find out which by examining the output (if you run youtube-dl on the console) or catching an `UnsupportedError` exception if you run it from a Python program. - -# Why do I need to go through that much red tape when filing bugs? - -Before we had the issue template, despite our extensive [bug reporting instructions](#bugs), about 80% of the issue reports we got were useless, for instance because people used ancient versions hundreds of releases old, because of simple syntactic errors (not in youtube-dl but in general shell usage), because the problem was already reported multiple times before, because people did not actually read an error message, even if it said "please install ffmpeg", because people did not mention the URL they were trying to download and many more simple, easy-to-avoid problems, many of whom were totally unrelated to youtube-dl. - -youtube-dl is an open-source project manned by too few volunteers, so we'd rather spend time fixing bugs where we are certain none of those simple problems apply, and where we can be reasonably confident to be able to reproduce the issue without asking the reporter repeatedly. As such, the output of `youtube-dl -v YOUR_URL_HERE` is really all that's required to file an issue. The issue template also guides you through some basic steps you can do, such as checking that your version of youtube-dl is current. - -# DEVELOPER INSTRUCTIONS - -Most users do not need to build youtube-dl and can [download the builds](https://ytdl-org.github.io/youtube-dl/download.html) or get them from their distribution. - -To run youtube-dl as a developer, you don't need to build anything either. Simply execute - - python -m youtube_dl - -To run the test, simply invoke your favorite test runner, or execute a test file directly; any of the following work: - - python -m unittest discover - python test/test_download.py - nosetests - -See item 6 of [new extractor tutorial](#adding-support-for-a-new-site) for how to run extractor specific test cases. - -If you want to create a build of youtube-dl yourself, you'll need - -* python -* make (only GNU make is supported) -* pandoc -* zip -* nosetests - -### Adding support for a new site - -If you want to add support for a new site, first of all **make sure** this site is **not dedicated to [copyright infringement](README.md#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. youtube-dl does **not support** such sites thus pull requests adding support for them **will be rejected**. - -After you have ensured this site is distributing its content legally, you can follow this quick list (assuming your service is called `yourextractor`): - -1. [Fork this repository](https://github.com/ytdl-org/youtube-dl/fork) -2. Check out the source code with: - - git clone git@github.com:YOUR_GITHUB_USERNAME/youtube-dl.git - -3. Start a new git branch with - - cd youtube-dl - git checkout -b yourextractor - -4. Start with this simple template and save it to `youtube_dl/extractor/yourextractor.py`: - - ```python - # coding: utf-8 - from __future__ import unicode_literals - - from .common import InfoExtractor - - - class YourExtractorIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?yourextractor\.com/watch/(?P<id>[0-9]+)' - _TEST = { - 'url': 'https://yourextractor.com/watch/42', - 'md5': 'TODO: md5 sum of the first 10241 bytes of the video file (use --test)', - 'info_dict': { - 'id': '42', - 'ext': 'mp4', - 'title': 'Video title goes here', - 'thumbnail': r're:^https?://.*\.jpg$', - # TODO more properties, either as: - # * A value - # * MD5 checksum; start the string with md5: - # * A regular expression; start the string with re: - # * Any Python type (for example int or float) - } - } - - def _real_extract(self, url): - video_id = self._match_id(url) - webpage = self._download_webpage(url, video_id) - - # TODO more code goes here, for example ... - title = self._html_search_regex(r'<h1>(.+?)</h1>', webpage, 'title') - - return { - 'id': video_id, - 'title': title, - 'description': self._og_search_description(webpage), - '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. -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): - - $ flake8 youtube_dl/extractor/yourextractor.py - -9. Make sure your code works under all [Python](https://www.python.org/) versions claimed supported by youtube-dl, namely 2.6, 2.7, and 3.2+. -10. When the tests pass, [add](https://git-scm.com/docs/git-add) the new files and [commit](https://git-scm.com/docs/git-commit) them and [push](https://git-scm.com/docs/git-push) the result, like this: - - $ git add youtube_dl/extractor/extractors.py - $ git add youtube_dl/extractor/yourextractor.py - $ git commit -m '[yourextractor] Add new extractor' - $ git push origin yourextractor - -11. Finally, [create a pull request](https://help.github.com/articles/creating-a-pull-request). We'll then review and merge it. - -In any case, thank you very much for your contributions! - -## youtube-dl coding conventions - -This section introduces a guide lines for writing idiomatic, robust and future-proof extractor code. - -Extractors are very fragile by nature since they depend on the layout of the source data provided by 3rd party media hosters out of your control and this layout tends to change. As an extractor implementer your task is not only to write code that will extract media links and metadata correctly but also to minimize dependency on the source's layout and even to make the code foresee potential future changes and be ready for that. This is important because it will allow the extractor not to break on minor layout changes thus keeping old youtube-dl versions working. Even though this breakage issue is easily fixed by emitting a new version of youtube-dl with a fix incorporated, all the previous versions become broken in all repositories and distros' packages that may not be so prompt in fetching the update from us. Needless to say, some non rolling release distros may never receive an update at all. - -### Mandatory and optional metafields - -For extraction to work youtube-dl relies on metadata your extractor extracts and provides to youtube-dl expressed by an [information dictionary](https://github.com/ytdl-org/youtube-dl/blob/7f41a598b3fba1bcab2817de64a08941200aa3c8/youtube_dl/extractor/common.py#L94-L303) or simply *info dict*. Only the following meta fields in the *info dict* are considered mandatory for a successful extraction process by youtube-dl: - - - `id` (media identifier) - - `title` (media title) - - `url` (media download URL) or `formats` - -In fact only the last option is technically mandatory (i.e. if you can't figure out the download location of the media the extraction does not make any sense). But by convention youtube-dl also treats `id` and `title` as mandatory. Thus the aforementioned metafields are the critical data that the extraction does not make any sense without and if any of them fail to be extracted then the extractor is considered completely broken. - -[Any field](https://github.com/ytdl-org/youtube-dl/blob/7f41a598b3fba1bcab2817de64a08941200aa3c8/youtube_dl/extractor/common.py#L188-L303) apart from the aforementioned ones are considered **optional**. That means that extraction should be **tolerant** to situations when sources for these fields can potentially be unavailable (even if they are always available at the moment) and **future-proof** in order not to break the extraction of general purpose mandatory fields. - -#### Example - -Say you have some source dictionary `meta` that you've fetched as JSON with HTTP request and it has a key `summary`: - -```python -meta = self._download_json(url, video_id) -``` - -Assume at this point `meta`'s layout is: - -```python -{ - ... - "summary": "some fancy summary text", - ... -} -``` - -Assume you want to extract `summary` and put it into the resulting info dict as `description`. Since `description` is an optional meta field you should be ready that this key may be missing from the `meta` dict, so that you should extract it like: - -```python -description = meta.get('summary') # correct -``` - -and not like: - -```python -description = meta['summary'] # incorrect -``` - -The latter will break extraction process with `KeyError` if `summary` disappears from `meta` at some later time but with the former approach extraction will just go ahead with `description` set to `None` which is perfectly fine (remember `None` is equivalent to the absence of data). - -Similarly, you should pass `fatal=False` when extracting optional data from a webpage with `_search_regex`, `_html_search_regex` or similar methods, for instance: - -```python -description = self._search_regex( - r'<span[^>]+id="title"[^>]*>([^<]+)<', - webpage, 'description', fatal=False) -``` - -With `fatal` set to `False` if `_search_regex` fails to extract `description` it will emit a warning and continue extraction. - -You can also pass `default=<some fallback value>`, for example: - -```python -description = self._search_regex( - r'<span[^>]+id="title"[^>]*>([^<]+)<', - webpage, 'description', default=None) -``` - -On failure this code will silently continue the extraction with `description` set to `None`. That is useful for metafields that may or may not be present. - -### Provide fallbacks - -When extracting metadata try to do so from multiple sources. For example if `title` is present in several places, try extracting from at least some of them. This makes it more future-proof in case some of the sources become unavailable. - -#### Example - -Say `meta` from the previous example has a `title` and you are about to extract it. Since `title` is a mandatory meta field you should end up with something like: - -```python -title = meta['title'] -``` - -If `title` disappears from `meta` in future due to some changes on the hoster's side the extraction would fail since `title` is mandatory. That's expected. - -Assume that you have some another source you can extract `title` from, for example `og:title` HTML meta of a `webpage`. In this case you can provide a fallback scenario: - -```python -title = meta.get('title') or self._og_search_title(webpage) -``` - -This code will try to extract from `meta` first and if it fails it will try extracting `og:title` from a `webpage`. - -### Regular expressions - -#### Don't capture groups you don't use - -Capturing group must be an indication that it's used somewhere in the code. Any group that is not used must be non capturing. - -##### Example - -Don't capture id attribute name here since you can't use it for anything anyway. - -Correct: - -```python -r'(?:id|ID)=(?P<id>\d+)' -``` - -Incorrect: -```python -r'(id|ID)=(?P<id>\d+)' -``` - - -#### Make regular expressions relaxed and flexible - -When using regular expressions try to write them fuzzy, relaxed and flexible, skipping insignificant parts that are more likely to change, allowing both single and double quotes for quoted values and so on. - -##### Example - -Say you need to extract `title` from the following HTML code: - -```html -<span style="position: absolute; left: 910px; width: 90px; float: right; z-index: 9999;" class="title">some fancy title</span> -``` - -The code for that task should look similar to: - -```python -title = self._search_regex( - r'<span[^>]+class="title"[^>]*>([^<]+)', webpage, 'title') -``` - -Or even better: - -```python -title = self._search_regex( - r'<span[^>]+class=(["\'])title\1[^>]*>(?P<title>[^<]+)', - webpage, 'title', group='title') -``` - -Note how you tolerate potential changes in the `style` attribute's value or switch from using double quotes to single for `class` attribute: - -The code definitely should not look like: - -```python -title = self._search_regex( - r'<span style="position: absolute; left: 910px; width: 90px; float: right; z-index: 9999;" class="title">(.*?)</span>', - webpage, 'title', group='title') -``` - -### Long lines policy - -There is a soft limit to keep lines of code under 80 characters long. This means it should be respected if possible and if it does not make readability and code maintenance worse. - -For example, you should **never** split long string literals like URLs or some other often copied entities over multiple lines to fit this limit: - -Correct: - -```python -'https://www.youtube.com/watch?v=FqZTN594JQw&list=PLMYEtVRpaqY00V9W81Cwmzp6N6vZqfUKD4' -``` - -Incorrect: - -```python -'https://www.youtube.com/watch?v=FqZTN594JQw&list=' -'PLMYEtVRpaqY00V9W81Cwmzp6N6vZqfUKD4' -``` - -### Inline values - -Extracting variables is acceptable for reducing code duplication and improving readability of complex expressions. However, you should avoid extracting variables used only once and moving them to opposite parts of the extractor file, which makes reading the linear flow difficult. - -#### Example - -Correct: - -```python -title = self._html_search_regex(r'<title>([^<]+)', webpage, 'title') -``` - -Incorrect: - -```python -TITLE_RE = r'([^<]+)' -# ...some lines of code... -title = self._html_search_regex(TITLE_RE, webpage, 'title') -``` - -### Collapse fallbacks - -Multiple fallback values can quickly become unwieldy. Collapse multiple fallback values into a single expression via a list of patterns. - -#### Example - -Good: - -```python -description = self._html_search_meta( - ['og:description', 'description', 'twitter:description'], - webpage, 'description', default=None) -``` - -Unwieldy: - -```python -description = ( - self._og_search_description(webpage, default=None) - or self._html_search_meta('description', webpage, default=None) - or self._html_search_meta('twitter:description', webpage, default=None)) -``` - -Methods supporting list of patterns are: `_search_regex`, `_html_search_regex`, `_og_search_property`, `_html_search_meta`. - -### Trailing parentheses - -Always move trailing parentheses after the last argument. - -#### Example - -Correct: - -```python - lambda x: x['ResultSet']['Result'][0]['VideoUrlSet']['VideoUrl'], - list) -``` - -Incorrect: - -```python - lambda x: x['ResultSet']['Result'][0]['VideoUrlSet']['VideoUrl'], - list, -) -``` - -### Use convenience conversion and parsing functions - -Wrap all extracted numeric data into safe functions from [`youtube_dl/utils.py`](https://github.com/ytdl-org/youtube-dl/blob/master/youtube_dl/utils.py): `int_or_none`, `float_or_none`. Use them for string to number conversions as well. - -Use `url_or_none` for safe URL processing. - -Use `try_get` for safe metadata extraction from parsed JSON. - -Use `unified_strdate` for uniform `upload_date` or any `YYYYMMDD` meta field extraction, `unified_timestamp` for uniform `timestamp` extraction, `parse_filesize` for `filesize` extraction, `parse_count` for count meta fields extraction, `parse_resolution`, `parse_duration` for `duration` extraction, `parse_age_limit` for `age_limit` extraction. - -Explore [`youtube_dl/utils.py`](https://github.com/ytdl-org/youtube-dl/blob/master/youtube_dl/utils.py) for more useful convenience functions. - -#### More examples - -##### Safely extract optional description from parsed JSON -```python -description = try_get(response, lambda x: x['result']['video'][0]['summary'], compat_str) -``` - -##### Safely extract more optional metadata -```python -video = try_get(response, lambda x: x['result']['video'][0], dict) or {} -description = video.get('summary') -duration = float_or_none(video.get('durationMs'), scale=1000) -view_count = int_or_none(video.get('views')) -``` - -# EMBEDDING YOUTUBE-DL - -youtube-dl makes the best effort to be a good command-line program, and thus should be callable from any programming language. If you encounter any problems parsing its output, feel free to [create a report](https://github.com/ytdl-org/youtube-dl/issues/new). - -From a Python program, you can embed youtube-dl in a more powerful fashion, like this: - -```python -from __future__ import unicode_literals -import youtube_dl - -ydl_opts = {} -with youtube_dl.YoutubeDL(ydl_opts) as ydl: - ydl.download(['https://www.youtube.com/watch?v=BaW_jenozKc']) -``` - -Most likely, you'll want to use various options. For a list of options available, have a look at [`youtube_dl/YoutubeDL.py`](https://github.com/ytdl-org/youtube-dl/blob/3e4cedf9e8cd3157df2457df7274d0c842421945/youtube_dl/YoutubeDL.py#L137-L312). For a start, if you want to intercept youtube-dl's output, set a `logger` object. - -Here's a more complete example of a program that outputs only errors (and a short message after the download is finished), and downloads/converts the video to an mp3 file: - -```python -from __future__ import unicode_literals -import youtube_dl - - -class MyLogger(object): - def debug(self, msg): - pass - - def warning(self, msg): - pass - - def error(self, msg): - print(msg) - - -def my_hook(d): - if d['status'] == 'finished': - print('Done downloading, now converting ...') - - -ydl_opts = { - 'format': 'bestaudio/best', - 'postprocessors': [{ - 'key': 'FFmpegExtractAudio', - 'preferredcodec': 'mp3', - 'preferredquality': '192', - }], - 'logger': MyLogger(), - 'progress_hooks': [my_hook], -} -with youtube_dl.YoutubeDL(ydl_opts) as ydl: - ydl.download(['https://www.youtube.com/watch?v=BaW_jenozKc']) -``` - -# BUGS - -Bugs and suggestions should be reported at: . Unless you were prompted to or there is another pertinent reason (e.g. GitHub fails to accept the bug report), please do not send bug reports via personal email. For discussions, join us in the IRC channel [#youtube-dl](irc://chat.freenode.net/#youtube-dl) on freenode ([webchat](https://webchat.freenode.net/?randomnick=1&channels=youtube-dl)). - -**Please include the full output of youtube-dl when run with `-v`**, i.e. **add** `-v` flag to **your command line**, copy the **whole** output and post it in the issue body wrapped in \`\`\` for better formatting. It should look similar to this: -``` -$ youtube-dl -v -[debug] System config: [] -[debug] User config: [] -[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=BaW_jenozKcj'] -[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251 -[debug] youtube-dl version 2015.12.06 -[debug] Git HEAD: 135392e -[debug] Python version 2.6.6 - Windows-2003Server-5.2.3790-SP2 -[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4 -[debug] Proxy map: {} -... -``` -**Do not post screenshots of verbose logs; only plain text is acceptable.** - -The output (including the first lines) contains important debugging information. Issues without the full output are often not reproducible and therefore do not get solved in short order, if ever. - -Please re-read your issue once again to avoid a couple of common mistakes (you can and should use this as a checklist): - -### Is the description of the issue itself sufficient? - -We often get issue reports that we cannot really decipher. While in most cases we eventually get the required information after asking back multiple times, this poses an unnecessary drain on our resources. Many contributors, including myself, are also not native speakers, so we may misread some parts. - -So please elaborate on what feature you are requesting, or what bug you want to be fixed. Make sure that it's obvious - -- What the problem is -- How it could be fixed -- How your proposed solution would look like - -If your report is shorter than two lines, it is almost certainly missing some of these, which makes it hard for us to respond to it. We're often too polite to close the issue outright, but the missing info makes misinterpretation likely. As a committer myself, I often get frustrated by these issues, since the only possible way for me to move forward on them is to ask for clarification over and over. - -For bug reports, this means that your report should contain the *complete* output of youtube-dl when called with the `-v` flag. The error message you get for (most) bugs even says so, but you would not believe how many of our bug reports do not contain this information. - -If your server has multiple IPs or you suspect censorship, adding `--call-home` may be a good idea to get more diagnostics. If the error is `ERROR: Unable to extract ...` and you cannot reproduce it from multiple countries, add `--dump-pages` (warning: this will yield a rather large output, redirect it to the file `log.txt` by adding `>log.txt 2>&1` to your command-line) or upload the `.dump` files you get when you add `--write-pages` [somewhere](https://gist.github.com/). - -**Site support requests must contain an example URL**. An example URL is a URL you might want to download, like `https://www.youtube.com/watch?v=BaW_jenozKc`. There should be an obvious video present. Except under very special circumstances, the main page of a video service (e.g. `https://www.youtube.com/`) is *not* an example URL. - -### Are you using the latest version? - -Before reporting any issue, type `youtube-dl -U`. This should report that you're up-to-date. About 20% of the reports we receive are already fixed, but people are using outdated versions. This goes for feature requests as well. - -### Is the issue already documented? - -Make sure that someone has not already opened the issue you're trying to open. Search at the top of the window or browse the [GitHub Issues](https://github.com/ytdl-org/youtube-dl/search?type=Issues) of this repository. If there is an issue, feel free to write something along the lines of "This affects me as well, with version 2015.01.01. Here is some more information on the issue: ...". While some issues may be old, a new post into them often spurs rapid activity. - -### Why are existing options not enough? - -Before requesting a new feature, please have a quick peek at [the list of supported options](https://github.com/ytdl-org/youtube-dl/blob/master/README.md#options). Many feature requests are for features that actually exist already! Please, absolutely do show off your work in the issue report and detail how the existing similar options do *not* solve your problem. - -### Is there enough context in your bug report? - -People want to solve problems, and often think they do us a favor by breaking down their larger problems (e.g. wanting to skip already downloaded files) to a specific request (e.g. requesting us to look whether the file exists before downloading the info page). However, what often happens is that they break down the problem into two steps: One simple, and one impossible (or extremely complicated one). - -We are then presented with a very complicated request when the original problem could be solved far easier, e.g. by recording the downloaded video IDs in a separate file. To avoid this, you must include the greater context where it is non-obvious. In particular, every feature request that does not consist of adding support for a new site should contain a use case scenario that explains in what situation the missing feature would be useful. - -### Does the issue involve one problem, and one problem only? - -Some of our users seem to think there is a limit of issues they can or should open. There is no limit of issues they can or should open. While it may seem appealing to be able to dump all your issues into one ticket, that means that someone who solves one of your issues cannot mark the issue as closed. Typically, reporting a bunch of issues leads to the ticket lingering since nobody wants to attack that behemoth, until someone mercifully splits the issue into multiple ones. - -In particular, every site support request issue should only pertain to services at one site (generally under a common domain, but always using the same backend technology). Do not request support for vimeo user videos, White house podcasts, and Google Plus pages in the same issue. Also, make sure that you don't post bug reports alongside feature requests. As a rule of thumb, a feature request does not include outputs of youtube-dl that are not immediately related to the feature at hand. Do not post reports of a network error alongside the request for a new video service. - -### Is anyone going to need the feature? - -Only post features that you (or an incapacitated friend you can personally talk to) require. Do not post features because they seem like a good idea. If they are really useful, they will be requested by someone who requires them. - -### Is your question about youtube-dl? - -It may sound strange, but some bug reports we receive are completely unrelated to youtube-dl and relate to a different, or even the reporter's own, application. Please make sure that you are actually using youtube-dl. If you are using a UI for youtube-dl, report the bug to the maintainer of the actual application providing the UI. On the other hand, if your UI for youtube-dl fails in some way you believe is related to youtube-dl, by all means, go ahead and report the bug. - -# COPYRIGHT - -youtube-dl is released into the public domain by the copyright holders. - -This README file was originally written by [Daniel Bolton](https://github.com/dbbolton) and is likewise released into the public domain. +If you want to contribute, send us a diff to [contribute@haruhi.download](mailto:contribute@haruhi.download) \ No newline at end of file diff --git a/bin/youtube-dl b/bin/haruhi-dl similarity index 56% rename from bin/youtube-dl rename to bin/haruhi-dl index fc3cc8ad8..cadbb47fc 100755 --- a/bin/youtube-dl +++ b/bin/haruhi-dl @@ -1,6 +1,6 @@ #!/usr/bin/env python -import youtube_dl +import haruhi_dl if __name__ == '__main__': - youtube_dl.main() + haruhi_dl.main() diff --git a/devscripts/bash-completion.in b/devscripts/bash-completion.in index 28bd23727..5401df168 100644 --- a/devscripts/bash-completion.in +++ b/devscripts/bash-completion.in @@ -1,4 +1,4 @@ -__youtube_dl() +__haruhi_dl() { local cur prev opts fileopts diropts keywords COMPREPLY=() @@ -26,4 +26,4 @@ __youtube_dl() fi } -complete -F __youtube_dl youtube-dl +complete -F __haruhi_dl haruhi-dl diff --git a/devscripts/bash-completion.py b/devscripts/bash-completion.py index 3d1391334..a0b800a6d 100755 --- a/devscripts/bash-completion.py +++ b/devscripts/bash-completion.py @@ -6,9 +6,9 @@ from os.path import dirname as dirn import sys sys.path.insert(0, dirn(dirn((os.path.abspath(__file__))))) -import youtube_dl +import haruhi_dl -BASH_COMPLETION_FILE = "youtube-dl.bash-completion" +BASH_COMPLETION_FILE = "haruhi-dl.bash-completion" BASH_COMPLETION_TEMPLATE = "devscripts/bash-completion.in" @@ -26,5 +26,5 @@ def build_completion(opt_parser): f.write(filled_template) -parser = youtube_dl.parseOpts()[0] +parser = haruhi_dl.parseOpts()[0] build_completion(parser) diff --git a/devscripts/buildserver.py b/devscripts/buildserver.py index 4a4295ba9..e06f26498 100644 --- a/devscripts/buildserver.py +++ b/devscripts/buildserver.py @@ -12,7 +12,7 @@ import traceback import os.path sys.path.insert(0, os.path.dirname(os.path.dirname((os.path.abspath(__file__))))) -from youtube_dl.compat import ( +from haruhi_dl.compat import ( compat_input, compat_http_server, compat_str, @@ -321,16 +321,16 @@ class GITBuilder(GITInfoBuilder): super(GITBuilder, self).build() -class YoutubeDLBuilder(object): +class HaruhiDLBuilder(object): authorizedUsers = ['fraca7', 'phihag', 'rg3', 'FiloSottile', 'ytdl-org'] def __init__(self, **kwargs): - if self.repoName != 'youtube-dl': + if self.repoName != 'haruhi-dl': raise BuildError('Invalid repository "%s"' % self.repoName) if self.user not in self.authorizedUsers: raise HTTPError('Unauthorized user "%s"' % self.user, 401) - super(YoutubeDLBuilder, self).__init__(**kwargs) + super(HaruhiDLBuilder, self).__init__(**kwargs) def build(self): try: @@ -341,7 +341,7 @@ class YoutubeDLBuilder(object): except subprocess.CalledProcessError as e: raise BuildError(e.output) - super(YoutubeDLBuilder, self).build() + super(HaruhiDLBuilder, self).build() class DownloadBuilder(object): @@ -396,7 +396,7 @@ class Null(object): pass -class Builder(PythonBuilder, GITBuilder, YoutubeDLBuilder, DownloadBuilder, CleanupTempDir, Null): +class Builder(PythonBuilder, GITBuilder, HaruhiDLBuilder, DownloadBuilder, CleanupTempDir, Null): pass diff --git a/devscripts/check-porn.py b/devscripts/check-porn.py index 740f04de0..cf75372ab 100644 --- a/devscripts/check-porn.py +++ b/devscripts/check-porn.py @@ -15,8 +15,8 @@ import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import gettestcases -from youtube_dl.utils import compat_urllib_parse_urlparse -from youtube_dl.utils import compat_urllib_request +from haruhi_dl.utils import compat_urllib_parse_urlparse +from haruhi_dl.utils import compat_urllib_request if len(sys.argv) > 1: METHOD = 'LIST' diff --git a/devscripts/create-github-release.py b/devscripts/create-github-release.py index 2ddfa1096..40bced2f6 100644 --- a/devscripts/create-github-release.py +++ b/devscripts/create-github-release.py @@ -12,21 +12,21 @@ import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from youtube_dl.compat import ( +from haruhi_dl.compat import ( compat_basestring, compat_getpass, compat_print, compat_urllib_request, ) -from youtube_dl.utils import ( +from haruhi_dl.utils import ( make_HTTPS_handler, sanitized_Request, ) class GitHubReleaser(object): - _API_URL = 'https://api.github.com/repos/ytdl-org/youtube-dl/releases' - _UPLOADS_URL = 'https://uploads.github.com/repos/ytdl-org/youtube-dl/releases/%s/assets?name=%s' + _API_URL = 'https://api.github.com/repos/ytdl-org/haruhi-dl/releases' + _UPLOADS_URL = 'https://uploads.github.com/repos/ytdl-org/haruhi-dl/releases/%s/assets?name=%s' _NETRC_MACHINE = 'github.com' def __init__(self, debuglevel=0): @@ -98,7 +98,7 @@ def main(): releaser = GitHubReleaser() new_release = releaser.create_release( - version, name='youtube-dl %s' % version, body=body) + version, name='haruhi-dl %s' % version, body=body) release_id = new_release['id'] for asset in os.listdir(build_path): diff --git a/devscripts/fish-completion.in b/devscripts/fish-completion.in index eb79765da..939a70f9e 100644 --- a/devscripts/fish-completion.in +++ b/devscripts/fish-completion.in @@ -2,4 +2,4 @@ {{commands}} -complete --command youtube-dl --arguments ":ytfavorites :ytrecommended :ytsubscriptions :ytwatchlater :ythistory" +complete --command haruhi-dl --arguments ":ytfavorites :ytrecommended :ytsubscriptions :ytwatchlater :ythistory" diff --git a/devscripts/fish-completion.py b/devscripts/fish-completion.py index 51d19dd33..a64741971 100755 --- a/devscripts/fish-completion.py +++ b/devscripts/fish-completion.py @@ -7,10 +7,10 @@ from os.path import dirname as dirn import sys sys.path.insert(0, dirn(dirn((os.path.abspath(__file__))))) -import youtube_dl -from youtube_dl.utils import shell_quote +import haruhi_dl +from haruhi_dl.utils import shell_quote -FISH_COMPLETION_FILE = 'youtube-dl.fish' +FISH_COMPLETION_FILE = 'haruhi-dl.fish' FISH_COMPLETION_TEMPLATE = 'devscripts/fish-completion.in' EXTRA_ARGS = { @@ -30,7 +30,7 @@ def build_completion(opt_parser): for group in opt_parser.option_groups: for option in group.option_list: long_option = option.get_opt_string().strip('-') - complete_cmd = ['complete', '--command', 'youtube-dl', '--long-option', long_option] + complete_cmd = ['complete', '--command', 'haruhi-dl', '--long-option', long_option] if option._short_opts: complete_cmd += ['--short-option', option._short_opts[0].strip('-')] if option.help != optparse.SUPPRESS_HELP: @@ -45,5 +45,5 @@ def build_completion(opt_parser): f.write(filled_template) -parser = youtube_dl.parseOpts()[0] +parser = haruhi_dl.parseOpts()[0] build_completion(parser) diff --git a/devscripts/generate_aes_testdata.py b/devscripts/generate_aes_testdata.py index e3df42cc2..65044fa19 100644 --- a/devscripts/generate_aes_testdata.py +++ b/devscripts/generate_aes_testdata.py @@ -7,8 +7,8 @@ import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from youtube_dl.utils import intlist_to_bytes -from youtube_dl.aes import aes_encrypt, key_expansion +from haruhi_dl.utils import intlist_to_bytes +from haruhi_dl.aes import aes_encrypt, key_expansion secret_msg = b'Secret message goes here' diff --git a/devscripts/gh-pages/add-version.py b/devscripts/gh-pages/add-version.py index 867ea0048..7dfe04dad 100755 --- a/devscripts/gh-pages/add-version.py +++ b/devscripts/gh-pages/add-version.py @@ -22,9 +22,9 @@ if 'signature' in versions_info: new_version = {} filenames = { - 'bin': 'youtube-dl', - 'exe': 'youtube-dl.exe', - 'tar': 'youtube-dl-%s.tar.gz' % version} + 'bin': 'haruhi-dl', + 'exe': 'haruhi-dl.exe', + 'tar': 'haruhi-dl-%s.tar.gz' % version} build_dir = os.path.join('..', '..', 'build', version) for key, filename in filenames.items(): url = 'https://yt-dl.org/downloads/%s/%s' % (version, filename) diff --git a/devscripts/gh-pages/update-feed.py b/devscripts/gh-pages/update-feed.py index 506a62377..349151741 100755 --- a/devscripts/gh-pages/update-feed.py +++ b/devscripts/gh-pages/update-feed.py @@ -10,25 +10,25 @@ import textwrap atom_template = textwrap.dedent("""\ - - youtube-dl releases - https://yt-dl.org/feed/youtube-dl-updates-feed + + haruhi-dl releases + https://yt-dl.org/feed/haruhi-dl-updates-feed @TIMESTAMP@ @ENTRIES@ """) entry_template = textwrap.dedent(""" - https://yt-dl.org/feed/youtube-dl-updates-feed/youtube-dl-@VERSION@ + https://yt-dl.org/feed/haruhi-dl-updates-feed/haruhi-dl-@VERSION@ New version @VERSION@ - + - The youtube-dl maintainers + The haruhi-dl maintainers @TIMESTAMP@ diff --git a/devscripts/gh-pages/update-sites.py b/devscripts/gh-pages/update-sites.py index 531c93c70..05f8b3839 100755 --- a/devscripts/gh-pages/update-sites.py +++ b/devscripts/gh-pages/update-sites.py @@ -5,10 +5,10 @@ import sys import os import textwrap -# We must be able to import youtube_dl +# We must be able to import haruhi_dl sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) -import youtube_dl +import haruhi_dl def main(): @@ -16,7 +16,7 @@ def main(): template = tmplf.read() ie_htmls = [] - for ie in youtube_dl.list_extractors(age_limit=None): + for ie in haruhi_dl.list_extractors(age_limit=None): ie_html = '{}'.format(ie.IE_NAME) ie_desc = getattr(ie, 'IE_DESC', None) if ie_desc is False: diff --git a/devscripts/make_issue_template.py b/devscripts/make_issue_template.py index b7ad23d83..72b082346 100644 --- a/devscripts/make_issue_template.py +++ b/devscripts/make_issue_template.py @@ -16,9 +16,9 @@ def main(): with io.open(infile, encoding='utf-8') as inf: issue_template_tmpl = inf.read() - # Get the version from youtube_dl/version.py without importing the package - exec(compile(open('youtube_dl/version.py').read(), - 'youtube_dl/version.py', 'exec')) + # Get the version from haruhi_dl/version.py without importing the package + exec(compile(open('haruhi_dl/version.py').read(), + 'haruhi_dl/version.py', 'exec')) out = issue_template_tmpl % {'version': locals()['__version__']} diff --git a/devscripts/make_lazy_extractors.py b/devscripts/make_lazy_extractors.py index 0a1762dbc..50b5e19ca 100644 --- a/devscripts/make_lazy_extractors.py +++ b/devscripts/make_lazy_extractors.py @@ -14,8 +14,8 @@ lazy_extractors_filename = sys.argv[1] if os.path.exists(lazy_extractors_filename): os.remove(lazy_extractors_filename) -from youtube_dl.extractor import _ALL_CLASSES -from youtube_dl.extractor.common import InfoExtractor, SearchInfoExtractor +from haruhi_dl.extractor import _ALL_CLASSES +from haruhi_dl.extractor.common import InfoExtractor, SearchInfoExtractor with open('devscripts/lazy_load_template.py', 'rt') as f: module_template = f.read() diff --git a/devscripts/make_readme.py b/devscripts/make_readme.py index 8fbce0796..827fdfd23 100755 --- a/devscripts/make_readme.py +++ b/devscripts/make_readme.py @@ -23,4 +23,4 @@ options = '# OPTIONS\n' + options + '\n' with io.open(README_FILE, 'w', encoding='utf-8') as f: f.write(header) f.write(options) - f.write(footer) + f.write(footer) \ No newline at end of file diff --git a/devscripts/make_supportedsites.py b/devscripts/make_supportedsites.py index 764795bc5..d0ac7c1eb 100644 --- a/devscripts/make_supportedsites.py +++ b/devscripts/make_supportedsites.py @@ -7,10 +7,10 @@ import os import sys -# Import youtube_dl +# Import haruhi_dl ROOT_DIR = os.path.join(os.path.dirname(__file__), '..') sys.path.insert(0, ROOT_DIR) -import youtube_dl +import haruhi_dl def main(): @@ -33,7 +33,7 @@ def main(): ie_md += ' (Currently broken)' yield ie_md - ies = sorted(youtube_dl.gen_extractors(), key=lambda i: i.IE_NAME.lower()) + ies = sorted(haruhi_dl.gen_extractors(), key=lambda i: i.IE_NAME.lower()) out = '# Supported sites\n' + ''.join( ' - ' + md + '\n' for md in gen_ies_md(ies)) diff --git a/devscripts/prepare_manpage.py b/devscripts/prepare_manpage.py index 76bf873e1..b5b72b939 100644 --- a/devscripts/prepare_manpage.py +++ b/devscripts/prepare_manpage.py @@ -16,7 +16,7 @@ youtube\-dl \- download videos from youtube.com or other video platforms # SYNOPSIS -**youtube-dl** \[OPTIONS\] URL [URL...] +**haruhi-dl** \[OPTIONS\] URL [URL...] ''' @@ -33,7 +33,7 @@ def main(): readme = f.read() readme = re.sub(r'(?s)^.*?(?=# DESCRIPTION)', '', readme) - readme = re.sub(r'\s+youtube-dl \[OPTIONS\] URL \[URL\.\.\.\]', '', readme) + readme = re.sub(r'\s+haruhi-dl \[OPTIONS\] URL \[URL\.\.\.\]', '', readme) readme = PREFIX + readme readme = filter_options(readme) diff --git a/devscripts/release.sh b/devscripts/release.sh index f2411c927..c26c34cba 100755 --- a/devscripts/release.sh +++ b/devscripts/release.sh @@ -53,8 +53,8 @@ fi if [ ! -z "`git tag | grep "$version"`" ]; then echo 'ERROR: version already present'; exit 1; fi if [ ! -z "`git status --porcelain | grep -v CHANGELOG`" ]; then echo 'ERROR: the working directory is not clean; commit or stash changes'; exit 1; fi -useless_files=$(find youtube_dl -type f -not -name '*.py') -if [ ! -z "$useless_files" ]; then echo "ERROR: Non-.py files in youtube_dl: $useless_files"; exit 1; fi +useless_files=$(find haruhi_dl -type f -not -name '*.py') +if [ ! -z "$useless_files" ]; then echo "ERROR: Non-.py files in haruhi_dl: $useless_files"; exit 1; fi if [ ! -f "updates_key.pem" ]; then echo 'ERROR: updates_key.pem missing'; exit 1; fi if ! type pandoc >/dev/null 2>/dev/null; then echo 'ERROR: pandoc is missing'; exit 1; fi if ! python3 -c 'import rsa' 2>/dev/null; then echo 'ERROR: python3-rsa is missing'; exit 1; fi @@ -68,18 +68,18 @@ make clean if $skip_tests ; then echo 'SKIPPING TESTS' else - nosetests --verbose --with-coverage --cover-package=youtube_dl --cover-html test --stop || exit 1 + nosetests --verbose --with-coverage --cover-package=haruhi_dl --cover-html test --stop || exit 1 fi /bin/echo -e "\n### Changing version in version.py..." -sed -i "s/__version__ = '.*'/__version__ = '$version'/" youtube_dl/version.py +sed -i "s/__version__ = '.*'/__version__ = '$version'/" haruhi_dl/version.py /bin/echo -e "\n### Changing version in ChangeLog..." sed -i "s//$version/" ChangeLog -/bin/echo -e "\n### Committing documentation, templates and youtube_dl/version.py..." +/bin/echo -e "\n### Committing documentation, templates and haruhi_dl/version.py..." make README.md CONTRIBUTING.md issuetemplates supportedsites -git add README.md CONTRIBUTING.md .github/ISSUE_TEMPLATE/1_broken_site.md .github/ISSUE_TEMPLATE/2_site_support_request.md .github/ISSUE_TEMPLATE/3_site_feature_request.md .github/ISSUE_TEMPLATE/4_bug_report.md .github/ISSUE_TEMPLATE/5_feature_request.md .github/ISSUE_TEMPLATE/6_question.md docs/supportedsites.md youtube_dl/version.py ChangeLog +git add README.md CONTRIBUTING.md .github/ISSUE_TEMPLATE/1_broken_site.md .github/ISSUE_TEMPLATE/2_site_support_request.md .github/ISSUE_TEMPLATE/3_site_feature_request.md .github/ISSUE_TEMPLATE/4_bug_report.md .github/ISSUE_TEMPLATE/5_feature_request.md .github/ISSUE_TEMPLATE/6_question.md docs/supportedsites.md haruhi_dl/version.py ChangeLog git commit $gpg_sign_commits -m "release $version" /bin/echo -e "\n### Now tagging, signing and pushing..." @@ -94,13 +94,13 @@ git push origin "$version" /bin/echo -e "\n### OK, now it is time to build the binaries..." REV=$(git rev-parse HEAD) -make youtube-dl youtube-dl.tar.gz +make haruhi-dl haruhi-dl.tar.gz read -p "VM running? (y/n) " -n 1 -wget "http://$buildserver/build/ytdl-org/youtube-dl/youtube-dl.exe?rev=$REV" -O youtube-dl.exe +wget "http://$buildserver/build/ytdl-org/haruhi-dl/haruhi-dl.exe?rev=$REV" -O haruhi-dl.exe mkdir -p "build/$version" -mv youtube-dl youtube-dl.exe "build/$version" -mv youtube-dl.tar.gz "build/$version/youtube-dl-$version.tar.gz" -RELEASE_FILES="youtube-dl youtube-dl.exe youtube-dl-$version.tar.gz" +mv haruhi-dl haruhi-dl.exe "build/$version" +mv haruhi-dl.tar.gz "build/$version/haruhi-dl-$version.tar.gz" +RELEASE_FILES="haruhi-dl haruhi-dl.exe haruhi-dl-$version.tar.gz" (cd build/$version/ && md5sum $RELEASE_FILES > MD5SUMS) (cd build/$version/ && sha1sum $RELEASE_FILES > SHA1SUMS) (cd build/$version/ && sha256sum $RELEASE_FILES > SHA2-256SUMS) diff --git a/devscripts/run_tests.sh b/devscripts/run_tests.sh index dd37a80f5..307ce9e06 100755 --- a/devscripts/run_tests.sh +++ b/devscripts/run_tests.sh @@ -6,7 +6,7 @@ DOWNLOAD_TESTS="age_restriction|download|iqiyi_sdk_interpreter|socks|subtitles|w test_set="" multiprocess_args="" -case "$YTDL_TEST_SET" in +case "$HDL_TEST_SET" in core) test_set="-I test_($DOWNLOAD_TESTS)\.py" ;; diff --git a/devscripts/show-downloads-statistics.py b/devscripts/show-downloads-statistics.py index 6c8d1cc2d..fbe2e852b 100644 --- a/devscripts/show-downloads-statistics.py +++ b/devscripts/show-downloads-statistics.py @@ -9,11 +9,11 @@ import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from youtube_dl.compat import ( +from haruhi_dl.compat import ( compat_print, compat_urllib_request, ) -from youtube_dl.utils import format_bytes +from haruhi_dl.utils import format_bytes def format_size(bytes): @@ -24,7 +24,7 @@ total_bytes = 0 for page in itertools.count(1): releases = json.loads(compat_urllib_request.urlopen( - 'https://api.github.com/repos/ytdl-org/youtube-dl/releases?page=%s' % page + 'https://api.github.com/repos/ytdl-org/haruhi-dl/releases?page=%s' % page ).read().decode('utf-8')) if not releases: @@ -36,9 +36,9 @@ for page in itertools.count(1): asset_name = asset['name'] total_bytes += asset['download_count'] * asset['size'] if all(not re.match(p, asset_name) for p in ( - r'^youtube-dl$', - r'^youtube-dl-\d{4}\.\d{2}\.\d{2}(?:\.\d+)?\.tar\.gz$', - r'^youtube-dl\.exe$')): + r'^haruhi-dl$', + r'^haruhi-dl-\d{4}\.\d{2}\.\d{2}(?:\.\d+)?\.tar\.gz$', + r'^haruhi-dl\.exe$')): continue compat_print( ' %s size: %s downloads: %d' diff --git a/devscripts/zsh-completion.in b/devscripts/zsh-completion.in index b394a1ae7..d92000a42 100644 --- a/devscripts/zsh-completion.in +++ b/devscripts/zsh-completion.in @@ -1,6 +1,6 @@ -#compdef youtube-dl +#compdef haruhi-dl -__youtube_dl() { +__haruhi_dl() { local curcontext="$curcontext" fileopts diropts cur prev typeset -A opt_args fileopts="{{fileopts}}" @@ -25,4 +25,4 @@ __youtube_dl() { esac } -__youtube_dl \ No newline at end of file +__haruhi_dl \ No newline at end of file diff --git a/devscripts/zsh-completion.py b/devscripts/zsh-completion.py index 60aaf76cc..9bdb463b3 100755 --- a/devscripts/zsh-completion.py +++ b/devscripts/zsh-completion.py @@ -6,9 +6,9 @@ from os.path import dirname as dirn import sys sys.path.insert(0, dirn(dirn((os.path.abspath(__file__))))) -import youtube_dl +import haruhi_dl -ZSH_COMPLETION_FILE = "youtube-dl.zsh" +ZSH_COMPLETION_FILE = "haruhi-dl.zsh" ZSH_COMPLETION_TEMPLATE = "devscripts/zsh-completion.in" @@ -45,5 +45,5 @@ def build_completion(opt_parser): f.write(template) -parser = youtube_dl.parseOpts()[0] +parser = haruhi_dl.parseOpts()[0] build_completion(parser) diff --git a/docs/Makefile b/docs/Makefile index 712218045..9d83f413c 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -85,17 +85,17 @@ qthelp: @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/youtube-dl.qhcp" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/haruhi-dl.qhcp" @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/youtube-dl.qhc" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/haruhi-dl.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/youtube-dl" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/youtube-dl" + @echo "# mkdir -p $$HOME/.local/share/devhelp/haruhi-dl" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/haruhi-dl" @echo "# devhelp" epub: diff --git a/docs/conf.py b/docs/conf.py index 0aaf1b8fc..bdd2d7583 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,6 +1,6 @@ # coding: utf-8 # -# youtube-dl documentation build configuration file, created by +# haruhi-dl documentation build configuration file, created by # sphinx-quickstart on Fri Mar 14 21:05:43 2014. # # This file is execfile()d with the current directory set to its @@ -14,7 +14,7 @@ import sys import os -# Allows to import youtube_dl +# Allows to import haruhi_dl sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) # -- General configuration ------------------------------------------------ @@ -36,7 +36,7 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'youtube-dl' +project = u'haruhi-dl' copyright = u'2014, Ricardo Garcia Gonzalez' # The version info for the project you're documenting, acts as replacement for @@ -44,7 +44,7 @@ copyright = u'2014, Ricardo Garcia Gonzalez' # built documents. # # The short X.Y version. -from youtube_dl.version import __version__ +from haruhi_dl.version import __version__ version = __version__ # The full version, including alpha/beta/rc tags. release = version @@ -68,4 +68,4 @@ html_theme = 'default' html_static_path = ['_static'] # Output file base name for HTML help builder. -htmlhelp_basename = 'youtube-dldoc' +htmlhelp_basename = 'haruhi-dldoc' diff --git a/docs/index.rst b/docs/index.rst index b746ff95b..b81202c45 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,13 +1,13 @@ -Welcome to youtube-dl's documentation! +Welcome to haruhi-dl's documentation! ====================================== -*youtube-dl* is a command-line program to download videos from YouTube.com and more sites. +*haruhi-dl* is a command-line program to download videos from YouTube.com and more sites. It can also be used in Python code. Developer guide --------------- -This section contains information for using *youtube-dl* from Python programs. +This section contains information for using *haruhi-dl* from Python programs. .. toctree:: :maxdepth: 2 diff --git a/docs/module_guide.rst b/docs/module_guide.rst index 03d72882e..a71b8db8b 100644 --- a/docs/module_guide.rst +++ b/docs/module_guide.rst @@ -1,18 +1,18 @@ -Using the ``youtube_dl`` module +Using the ``haruhi_dl`` module =============================== -When using the ``youtube_dl`` module, you start by creating an instance of :class:`YoutubeDL` and adding all the available extractors: +When using the ``haruhi_dl`` module, you start by creating an instance of :class:`HaruhiDL` and adding all the available extractors: .. code-block:: python - >>> from youtube_dl import YoutubeDL - >>> ydl = YoutubeDL() + >>> from haruhi_dl import HaruhiDL + >>> ydl = HaruhiDL() >>> ydl.add_default_info_extractors() Extracting video information ---------------------------- -You use the :meth:`YoutubeDL.extract_info` method for getting the video information, which returns a dictionary: +You use the :meth:`HaruhiDL.extract_info` method for getting the video information, which returns a dictionary: .. code-block:: python @@ -22,7 +22,7 @@ You use the :meth:`YoutubeDL.extract_info` method for getting the video informat [youtube] BaW_jenozKc: Downloading video info webpage [youtube] BaW_jenozKc: Extracting video information >>> info['title'] - 'youtube-dl test video "\'/\\ä↭𝕐' + 'haruhi-dl test video "\'/\\ä↭𝕐' >>> info['height'], info['width'] (720, 1280) diff --git a/youtube-dl.plugin.zsh b/haruhi-dl.plugin.zsh similarity index 66% rename from youtube-dl.plugin.zsh rename to haruhi-dl.plugin.zsh index 17ab1341a..8c088e100 100644 --- a/youtube-dl.plugin.zsh +++ b/haruhi-dl.plugin.zsh @@ -1,4 +1,4 @@ -# This allows the youtube-dl command to be installed in ZSH using antigen. +# This allows the haruhi-dl command to be installed in ZSH using antigen. # Antigen is a bundle manager. It allows you to enhance the functionality of # your zsh session by installing bundles and themes easily. @@ -6,11 +6,11 @@ # http://antigen.sharats.me/ # https://github.com/zsh-users/antigen -# Install youtube-dl: -# antigen bundle ytdl-org/youtube-dl +# Install haruhi-dl: +# antigen bundle ytdl-org/haruhi-dl # Bundles installed by antigen are available for use immediately. -# Update youtube-dl (and all other antigen bundles): +# Update haruhi-dl (and all other antigen bundles): # antigen update # The antigen command will download the git repository to a folder and then @@ -18,7 +18,7 @@ # code is documented here: # https://github.com/zsh-users/antigen#notes-on-writing-plugins -# This specific script just aliases youtube-dl to the python script that this +# This specific script just aliases haruhi-dl to the python script that this # library provides. This requires updating the PYTHONPATH to ensure that the # full set of code can be located. -alias youtube-dl="PYTHONPATH=$(dirname $0) $(dirname $0)/bin/youtube-dl" +alias haruhi-dl="PYTHONPATH=$(dirname $0) $(dirname $0)/bin/haruhi-dl" diff --git a/youtube_dl/YoutubeDL.py b/haruhi_dl/HaruhiDL.py similarity index 98% rename from youtube_dl/YoutubeDL.py rename to haruhi_dl/HaruhiDL.py index 19370f62b..00e8d138a 100755 --- a/youtube_dl/YoutubeDL.py +++ b/haruhi_dl/HaruhiDL.py @@ -89,10 +89,10 @@ from .utils import ( version_tuple, write_json_file, write_string, - YoutubeDLCookieJar, - YoutubeDLCookieProcessor, - YoutubeDLHandler, - YoutubeDLRedirectHandler, + HaruhiDLCookieJar, + HaruhiDLCookieProcessor, + HaruhiDLHandler, + HaruhiDLRedirectHandler, ) from .cache import Cache from .extractor import get_info_extractor, gen_extractor_classes, _LAZY_LOADER @@ -113,28 +113,28 @@ if compat_os_name == 'nt': import ctypes -class YoutubeDL(object): - """YoutubeDL class. +class HaruhiDL(object): + """HaruhiDL class. - YoutubeDL objects are the ones responsible of downloading the + HaruhiDL objects are the ones responsible of downloading the actual video file and writing it to disk if the user has requested it, among some other tasks. In most cases there should be one per program. As, given a video URL, the downloader doesn't know how to extract all the needed information, task that InfoExtractors do, it has to pass the URL to one of them. - For this, YoutubeDL objects have a method that allows + For this, HaruhiDL objects have a method that allows InfoExtractors to be registered in a given order. When it is passed - a URL, the YoutubeDL object handles it to the first InfoExtractor it + a URL, the HaruhiDL object handles it to the first InfoExtractor it finds that reports being able to handle it. The InfoExtractor extracts all the information about the video or videos the URL refers to, and - YoutubeDL process the extracted information, possibly using a File + HaruhiDL process the extracted information, possibly using a File Downloader to download the video. - YoutubeDL objects accept a lot of parameters. In order not to saturate + HaruhiDL objects accept a lot of parameters. In order not to saturate the object constructor with arguments, it receives a dictionary of options instead. These options are available through the params - attribute for the InfoExtractors to use. The YoutubeDL also + attribute for the InfoExtractors to use. The HaruhiDL also registers itself as the downloader in charge for the InfoExtractors that are added to it, so this is a "mutual registration". @@ -228,7 +228,7 @@ class YoutubeDL(object): playlist items. postprocessors: A list of dictionaries, each with an entry * key: The name of the postprocessor. See - youtube_dl/postprocessor/__init__.py for a list. + haruhi_dl/postprocessor/__init__.py for a list. as well as any further keyword arguments for the postprocessor. progress_hooks: A list of functions that get called on download @@ -264,7 +264,7 @@ class YoutubeDL(object): about it, warn otherwise (default) source_address: Client-side IP address to bind to. call_home: Boolean, true iff we are allowed to contact the - youtube-dl servers for debugging. + haruhi-dl servers for debugging. sleep_interval: Number of seconds to sleep before each download when used alone or a lower bound of a range for randomized sleep before each download (minimum possible number @@ -300,8 +300,8 @@ class YoutubeDL(object): if True, otherwise use ffmpeg/avconv if False, otherwise use downloader suggested by extractor if None. - The following parameters are not used by YoutubeDL itself, they are used by - the downloader (see youtube_dl/downloader/common.py): + The following parameters are not used by HaruhiDL itself, they are used by + the downloader (see haruhi_dl/downloader/common.py): nopart, updatetime, buffersize, ratelimit, min_filesize, max_filesize, test, noresizebuffer, retries, continuedl, noprogress, consoletitle, xattr_set_filesize, external_downloader_args, hls_use_mpegts, @@ -441,7 +441,7 @@ class YoutubeDL(object): if re.match(r'^-[0-9A-Za-z_-]{10}$', a)] if idxs: correct_argv = ( - ['youtube-dl'] + ['haruhi-dl'] + [a for i, a in enumerate(argv) if i not in idxs] + ['--'] + [argv[i] for i in idxs] ) @@ -893,7 +893,7 @@ class YoutubeDL(object): # url_transparent. In such cases outer metadata (from ie_result) # should be propagated to inner one (info). For this to happen # _type of info should be overridden with url_transparent. This - # fixes issue from https://github.com/ytdl-org/youtube-dl/pull/11163. + # fixes issue from https://github.com/ytdl-org/haruhi-dl/pull/11163. if new_result.get('_type') == 'url': new_result['_type'] = 'url_transparent' @@ -1610,7 +1610,7 @@ class YoutubeDL(object): # by extractor are incomplete or not (i.e. whether extractor provides only # video-only or audio-only formats) for proper formats selection for # extractors with such incomplete formats (see - # https://github.com/ytdl-org/youtube-dl/pull/5556). + # https://github.com/ytdl-org/haruhi-dl/pull/5556). # Since formats may be filtered during format selection and may not match # the original formats the results may be incorrect. Thus original formats # or pre-calculated metrics should be passed to format selection routines @@ -1618,7 +1618,7 @@ class YoutubeDL(object): # We will pass a context object containing all necessary additional data # instead of just formats. # This fixes incorrect format selection issue (see - # https://github.com/ytdl-org/youtube-dl/issues/10083). + # https://github.com/ytdl-org/haruhi-dl/issues/10083). incomplete_formats = ( # All formats are video-only or all(f.get('vcodec') != 'none' and f.get('acodec') == 'none' for f in formats) @@ -1823,7 +1823,7 @@ class YoutubeDL(object): if sub_info.get('data') is not None: try: # Use newline='' to prevent conversion of newline characters - # See https://github.com/ytdl-org/youtube-dl/issues/10268 + # See https://github.com/ytdl-org/haruhi-dl/issues/10268 with io.open(encodeFilename(sub_filename), 'w', encoding='utf-8', newline='') as subfile: subfile.write(sub_info['data']) except (OSError, IOError): @@ -2242,7 +2242,7 @@ class YoutubeDL(object): return if type('') is not compat_str: - # Python 2.6 on SLES11 SP1 (https://github.com/ytdl-org/youtube-dl/issues/3326) + # Python 2.6 on SLES11 SP1 (https://github.com/ytdl-org/haruhi-dl/issues/3326) self.report_warning( 'Your Python is broken! Update to a newer and supported version') @@ -2256,7 +2256,7 @@ class YoutubeDL(object): self.get_encoding())) write_string(encoding_str, encoding=None) - self._write_string('[debug] youtube-dl version ' + __version__ + '\n') + self._write_string('[debug] haruhi-dl version ' + __version__ + '\n') if _LAZY_LOADER: self._write_string('[debug] Lazy loading extractors enabled' + '\n') try: @@ -2324,11 +2324,11 @@ class YoutubeDL(object): self.cookiejar = compat_cookiejar.CookieJar() else: opts_cookiefile = expand_path(opts_cookiefile) - self.cookiejar = YoutubeDLCookieJar(opts_cookiefile) + self.cookiejar = HaruhiDLCookieJar(opts_cookiefile) if os.access(opts_cookiefile, os.R_OK): self.cookiejar.load(ignore_discard=True, ignore_expires=True) - cookie_processor = YoutubeDLCookieProcessor(self.cookiejar) + cookie_processor = HaruhiDLCookieProcessor(self.cookiejar) if opts_proxy is not None: if opts_proxy == '': proxies = {} @@ -2336,25 +2336,25 @@ class YoutubeDL(object): proxies = {'http': opts_proxy, 'https': opts_proxy} else: proxies = compat_urllib_request.getproxies() - # Set HTTPS proxy to HTTP one if given (https://github.com/ytdl-org/youtube-dl/issues/805) + # Set HTTPS proxy to HTTP one if given (https://github.com/ytdl-org/haruhi-dl/issues/805) if 'http' in proxies and 'https' not in proxies: proxies['https'] = proxies['http'] proxy_handler = PerRequestProxyHandler(proxies) debuglevel = 1 if self.params.get('debug_printtraffic') else 0 https_handler = make_HTTPS_handler(self.params, debuglevel=debuglevel) - ydlh = YoutubeDLHandler(self.params, debuglevel=debuglevel) - redirect_handler = YoutubeDLRedirectHandler() + ydlh = HaruhiDLHandler(self.params, debuglevel=debuglevel) + redirect_handler = HaruhiDLRedirectHandler() data_handler = compat_urllib_request_DataHandler() # When passing our own FileHandler instance, build_opener won't add the # default FileHandler and allows us to disable the file protocol, which # can be used for malicious purposes (see - # https://github.com/ytdl-org/youtube-dl/issues/8227) + # https://github.com/ytdl-org/haruhi-dl/issues/8227) file_handler = compat_urllib_request.FileHandler() def file_open(*args, **kwargs): - raise compat_urllib_error.URLError('file:// scheme is explicitly disabled in youtube-dl for security reasons') + raise compat_urllib_error.URLError('file:// scheme is explicitly disabled in haruhi-dl for security reasons') file_handler.file_open = file_open opener = compat_urllib_request.build_opener( @@ -2362,7 +2362,7 @@ class YoutubeDL(object): # Delete the default user-agent header, which would otherwise apply in # cases where our custom HTTP handler doesn't come into play - # (See https://github.com/ytdl-org/youtube-dl/issues/1309 for details) + # (See https://github.com/ytdl-org/haruhi-dl/issues/1309 for details) opener.addheaders = [] self._opener = opener diff --git a/youtube_dl/__init__.py b/haruhi_dl/__init__.py similarity index 98% rename from youtube_dl/__init__.py rename to haruhi_dl/__init__.py index 9a659fc65..693b354f6 100644 --- a/youtube_dl/__init__.py +++ b/haruhi_dl/__init__.py @@ -42,18 +42,18 @@ from .downloader import ( ) from .extractor import gen_extractors, list_extractors from .extractor.adobepass import MSO_INFO -from .YoutubeDL import YoutubeDL +from .HaruhiDL import HaruhiDL def _real_main(argv=None): # Compatibility fixes for Windows if sys.platform == 'win32': - # https://github.com/ytdl-org/youtube-dl/issues/820 + # https://github.com/ytdl-org/haruhi-dl/issues/820 codecs.register(lambda name: codecs.lookup('utf-8') if name == 'cp65001' else None) workaround_optparse_bug9161() - setproctitle('youtube-dl') + setproctitle('haruhi-dl') parser, opts, args = parseOpts(argv) @@ -438,7 +438,7 @@ def _real_main(argv=None): 'usetitle': opts.usetitle if opts.usetitle is True else None, } - with YoutubeDL(ydl_opts) as ydl: + with HaruhiDL(ydl_opts) as ydl: # Update version if opts.update_self: update_self(ydl.to_screen, opts.verbose, ydl._opener) @@ -455,7 +455,7 @@ def _real_main(argv=None): ydl.warn_if_short_id(sys.argv[1:] if argv is None else argv) parser.error( 'You must provide at least one URL.\n' - 'Type youtube-dl --help to see a list of all options.') + 'Type haruhi-dl --help to see a list of all options.') try: if opts.load_info_filename is not None: @@ -480,4 +480,4 @@ def main(argv=None): sys.exit('\nERROR: Interrupted by user') -__all__ = ['main', 'YoutubeDL', 'gen_extractors', 'list_extractors'] +__all__ = ['main', 'HaruhiDL', 'gen_extractors', 'list_extractors'] diff --git a/youtube_dl/__main__.py b/haruhi_dl/__main__.py similarity index 73% rename from youtube_dl/__main__.py rename to haruhi_dl/__main__.py index 138f5fbec..462a64d0a 100755 --- a/youtube_dl/__main__.py +++ b/haruhi_dl/__main__.py @@ -2,8 +2,8 @@ from __future__ import unicode_literals # Execute with -# $ python youtube_dl/__main__.py (2.6+) -# $ python -m youtube_dl (2.7+) +# $ python haruhi_dl/__main__.py (2.6+) +# $ python -m haruhi_dl (2.7+) import sys @@ -13,7 +13,7 @@ if __package__ is None and not hasattr(sys, 'frozen'): path = os.path.realpath(os.path.abspath(__file__)) sys.path.insert(0, os.path.dirname(os.path.dirname(path))) -import youtube_dl +import haruhi_dl if __name__ == '__main__': - youtube_dl.main() + haruhi_dl.main() diff --git a/youtube_dl/aes.py b/haruhi_dl/aes.py similarity index 100% rename from youtube_dl/aes.py rename to haruhi_dl/aes.py diff --git a/youtube_dl/cache.py b/haruhi_dl/cache.py similarity index 98% rename from youtube_dl/cache.py rename to haruhi_dl/cache.py index 7bdade1bd..464a05dc6 100644 --- a/youtube_dl/cache.py +++ b/haruhi_dl/cache.py @@ -23,7 +23,7 @@ class Cache(object): res = self._ydl.params.get('cachedir') if res is None: cache_root = compat_getenv('XDG_CACHE_HOME', '~/.cache') - res = os.path.join(cache_root, 'youtube-dl') + res = os.path.join(cache_root, 'haruhi-dl') return expand_path(res) def _get_cache_fn(self, section, key, dtype): diff --git a/youtube_dl/compat.py b/haruhi_dl/compat.py similarity index 99% rename from youtube_dl/compat.py rename to haruhi_dl/compat.py index 0ee9bc760..e016f0bf1 100644 --- a/youtube_dl/compat.py +++ b/haruhi_dl/compat.py @@ -2375,7 +2375,7 @@ except ImportError: # Python 2 # HACK: The following are the correct unquote_to_bytes, unquote and unquote_plus # implementations from cpython 3.4.3's stdlib. Python 2's version - # is apparently broken (see https://github.com/ytdl-org/youtube-dl/pull/6244) + # is apparently broken (see https://github.com/ytdl-org/haruhi-dl/pull/6244) def compat_urllib_parse_unquote_to_bytes(string): """unquote_to_bytes('abc%20def') -> b'abc def'.""" @@ -2850,7 +2850,7 @@ else: compat_socket_create_connection = socket.create_connection -# Fix https://github.com/ytdl-org/youtube-dl/issues/4223 +# Fix https://github.com/ytdl-org/haruhi-dl/issues/4223 # See http://bugs.python.org/issue9161 for what is broken def workaround_optparse_bug9161(): op = optparse.OptionParser() @@ -2973,9 +2973,9 @@ else: if platform.python_implementation() == 'PyPy' and sys.pypy_version_info < (5, 4, 0): # PyPy2 prior to version 5.4.0 expects byte strings as Windows function - # names, see the original PyPy issue [1] and the youtube-dl one [2]. + # names, see the original PyPy issue [1] and the haruhi-dl one [2]. # 1. https://bitbucket.org/pypy/pypy/issues/2360/windows-ctypescdll-typeerror-function-name - # 2. https://github.com/ytdl-org/youtube-dl/pull/4392 + # 2. https://github.com/ytdl-org/haruhi-dl/pull/4392 def compat_ctypes_WINFUNCTYPE(*args, **kwargs): real = ctypes.WINFUNCTYPE(*args, **kwargs) diff --git a/youtube_dl/downloader/__init__.py b/haruhi_dl/downloader/__init__.py similarity index 100% rename from youtube_dl/downloader/__init__.py rename to haruhi_dl/downloader/__init__.py diff --git a/youtube_dl/downloader/common.py b/haruhi_dl/downloader/common.py similarity index 98% rename from youtube_dl/downloader/common.py rename to haruhi_dl/downloader/common.py index 1cdba89cd..4f4decb46 100644 --- a/youtube_dl/downloader/common.py +++ b/haruhi_dl/downloader/common.py @@ -44,7 +44,7 @@ class FileDownloader(object): test: Download only first bytes to test the downloader. min_filesize: Skip files smaller than this size max_filesize: Skip files larger than this size - xattr_set_filesize: Set ytdl.filesize user xattribute with expected size. + xattr_set_filesize: Set hdl.filesize user xattribute with expected size. external_downloader_args: A list of additional command-line arguments for the external downloader. hls_use_mpegts: Use the mpegts container for HLS videos. @@ -192,7 +192,7 @@ class FileDownloader(object): return filename[:-len('.part')] return filename - def ytdl_filename(self, filename): + def hdl_filename(self, filename): return filename + '.ytdl' def try_rename(self, old_filename, new_filename): @@ -243,7 +243,7 @@ class FileDownloader(object): else: clear_line = ('\r\x1b[K' if sys.stderr.isatty() else '\r') self.to_screen(clear_line + fullmsg, skip_eol=not is_last_line) - self.to_console_title('youtube-dl ' + msg) + self.to_console_title('haruhi-dl ' + msg) def report_progress(self, s): if s['status'] == 'finished': diff --git a/youtube_dl/downloader/dash.py b/haruhi_dl/downloader/dash.py similarity index 100% rename from youtube_dl/downloader/dash.py rename to haruhi_dl/downloader/dash.py diff --git a/youtube_dl/downloader/external.py b/haruhi_dl/downloader/external.py similarity index 98% rename from youtube_dl/downloader/external.py rename to haruhi_dl/downloader/external.py index c31f8910a..15f6baa0b 100644 --- a/youtube_dl/downloader/external.py +++ b/haruhi_dl/downloader/external.py @@ -240,7 +240,7 @@ class FFmpegFD(ExternalFD): # setting -seekable prevents ffmpeg from guessing if the server # supports seeking(by adding the header `Range: bytes=0-`), which # can cause problems in some cases - # https://github.com/ytdl-org/youtube-dl/issues/11800#issuecomment-275037127 + # https://github.com/ytdl-org/haruhi-dl/issues/11800#issuecomment-275037127 # http://trac.ffmpeg.org/ticket/6125#comment:10 args += ['-seekable', '1' if seekable else '0'] @@ -341,7 +341,7 @@ class FFmpegFD(ExternalFD): # mp4 file couldn't be played, but if we ask ffmpeg to quit it # produces a file that is playable (this is mostly useful for live # streams). Note that Windows is not affected and produces playable - # files (see https://github.com/ytdl-org/youtube-dl/issues/8300). + # files (see https://github.com/ytdl-org/haruhi-dl/issues/8300). if sys.platform != 'win32': proc.communicate(b'q') raise diff --git a/youtube_dl/downloader/f4m.py b/haruhi_dl/downloader/f4m.py similarity index 98% rename from youtube_dl/downloader/f4m.py rename to haruhi_dl/downloader/f4m.py index 8dd3c2eeb..2d4a7f39f 100644 --- a/youtube_dl/downloader/f4m.py +++ b/haruhi_dl/downloader/f4m.py @@ -324,8 +324,8 @@ class F4mFD(FragmentFD): urlh = self.ydl.urlopen(self._prepare_url(info_dict, man_url)) man_url = urlh.geturl() # Some manifests may be malformed, e.g. prosiebensat1 generated manifests - # (see https://github.com/ytdl-org/youtube-dl/issues/6215#issuecomment-121704244 - # and https://github.com/ytdl-org/youtube-dl/issues/7823) + # (see https://github.com/ytdl-org/haruhi-dl/issues/6215#issuecomment-121704244 + # and https://github.com/ytdl-org/haruhi-dl/issues/7823) manifest = fix_xml_ampersands(urlh.read().decode('utf-8', 'ignore')).strip() doc = compat_etree_fromstring(manifest) @@ -409,7 +409,7 @@ class F4mFD(FragmentFD): # In tests, segments may be truncated, and thus # FlvReader may not be able to parse the whole # chunk. If so, write the segment as is - # See https://github.com/ytdl-org/youtube-dl/issues/9214 + # See https://github.com/ytdl-org/haruhi-dl/issues/9214 dest_stream.write(down_data) break raise diff --git a/youtube_dl/downloader/fragment.py b/haruhi_dl/downloader/fragment.py similarity index 88% rename from youtube_dl/downloader/fragment.py rename to haruhi_dl/downloader/fragment.py index 02f35459e..e0e77e97b 100644 --- a/youtube_dl/downloader/fragment.py +++ b/haruhi_dl/downloader/fragment.py @@ -32,9 +32,9 @@ class FragmentFD(FileDownloader): keep_fragments: Keep downloaded fragments on disk after downloading is finished - For each incomplete fragment download youtube-dl keeps on disk a special + For each incomplete fragment download haruhi-dl keeps on disk a special bookkeeping file with download state and metadata (in future such files will - be used for any incomplete download handled by youtube-dl). This file is + be used for any incomplete download handled by haruhi-dl). This file is used to properly handle resuming, check download file consistency and detect potential errors. The file has a .ytdl extension and represents a standard JSON file of the following format: @@ -70,21 +70,21 @@ class FragmentFD(FileDownloader): self._start_frag_download(ctx) @staticmethod - def __do_ytdl_file(ctx): + def __do_hdl_file(ctx): return not ctx['live'] and not ctx['tmpfilename'] == '-' - def _read_ytdl_file(self, ctx): - assert 'ytdl_corrupt' not in ctx - stream, _ = sanitize_open(self.ytdl_filename(ctx['filename']), 'r') + def _read_hdl_file(self, ctx): + assert 'hdl_corrupt' not in ctx + stream, _ = sanitize_open(self.hdl_filename(ctx['filename']), 'r') try: ctx['fragment_index'] = json.loads(stream.read())['downloader']['current_fragment']['index'] except Exception: - ctx['ytdl_corrupt'] = True + ctx['hdl_corrupt'] = True finally: stream.close() - def _write_ytdl_file(self, ctx): - frag_index_stream, _ = sanitize_open(self.ytdl_filename(ctx['filename']), 'w') + def _write_hdl_file(self, ctx): + frag_index_stream, _ = sanitize_open(self.hdl_filename(ctx['filename']), 'w') downloader = { 'current_fragment': { 'index': ctx['fragment_index'], @@ -114,8 +114,8 @@ class FragmentFD(FileDownloader): ctx['dest_stream'].write(frag_content) ctx['dest_stream'].flush() finally: - if self.__do_ytdl_file(ctx): - self._write_ytdl_file(ctx) + if self.__do_hdl_file(ctx): + self._write_hdl_file(ctx) if not self.params.get('keep_fragments', False): os.remove(encodeFilename(ctx['fragment_filename_sanitized'])) del ctx['fragment_filename_sanitized'] @@ -160,10 +160,10 @@ class FragmentFD(FileDownloader): 'fragment_index': 0, }) - if self.__do_ytdl_file(ctx): - if os.path.isfile(encodeFilename(self.ytdl_filename(ctx['filename']))): - self._read_ytdl_file(ctx) - is_corrupt = ctx.get('ytdl_corrupt') is True + if self.__do_hdl_file(ctx): + if os.path.isfile(encodeFilename(self.hdl_filename(ctx['filename']))): + self._read_hdl_file(ctx) + is_corrupt = ctx.get('hdl_corrupt') is True is_inconsistent = ctx['fragment_index'] > 0 and resume_len == 0 if is_corrupt or is_inconsistent: message = ( @@ -172,11 +172,11 @@ class FragmentFD(FileDownloader): self.report_warning( '%s. Restarting from the beginning...' % message) ctx['fragment_index'] = resume_len = 0 - if 'ytdl_corrupt' in ctx: - del ctx['ytdl_corrupt'] - self._write_ytdl_file(ctx) + if 'hdl_corrupt' in ctx: + del ctx['hdl_corrupt'] + self._write_hdl_file(ctx) else: - self._write_ytdl_file(ctx) + self._write_hdl_file(ctx) assert ctx['fragment_index'] == 0 dest_stream, tmpfilename = sanitize_open(tmpfilename, open_mode) @@ -248,10 +248,10 @@ class FragmentFD(FileDownloader): def _finish_frag_download(self, ctx): ctx['dest_stream'].close() - if self.__do_ytdl_file(ctx): - ytdl_filename = encodeFilename(self.ytdl_filename(ctx['filename'])) - if os.path.isfile(ytdl_filename): - os.remove(ytdl_filename) + if self.__do_hdl_file(ctx): + hdl_filename = encodeFilename(self.hdl_filename(ctx['filename'])) + if os.path.isfile(hdl_filename): + os.remove(hdl_filename) elapsed = time.time() - ctx['started'] if ctx['tmpfilename'] == '-': diff --git a/youtube_dl/downloader/hls.py b/haruhi_dl/downloader/hls.py similarity index 98% rename from youtube_dl/downloader/hls.py rename to haruhi_dl/downloader/hls.py index 0f2c06f40..699941118 100644 --- a/youtube_dl/downloader/hls.py +++ b/haruhi_dl/downloader/hls.py @@ -152,8 +152,8 @@ class HlsFD(FragmentFD): except compat_urllib_error.HTTPError as err: # Unavailable (possibly temporary) fragments may be served. # First we try to retry then either skip or abort. - # See https://github.com/ytdl-org/youtube-dl/issues/10165, - # https://github.com/ytdl-org/youtube-dl/issues/10448). + # See https://github.com/ytdl-org/haruhi-dl/issues/10165, + # https://github.com/ytdl-org/haruhi-dl/issues/10448). count += 1 if count <= fragment_retries: self.report_retry_fragment(err, frag_index, count, fragment_retries) diff --git a/youtube_dl/downloader/http.py b/haruhi_dl/downloader/http.py similarity index 98% rename from youtube_dl/downloader/http.py rename to haruhi_dl/downloader/http.py index 96379caf1..5fba7ea89 100644 --- a/youtube_dl/downloader/http.py +++ b/haruhi_dl/downloader/http.py @@ -116,7 +116,7 @@ class HttpFD(FileDownloader): # to match the value of requested Range HTTP header. This is due to a webservers # that don't support resuming and serve a whole file with no Content-Range # set in response despite of requested Range (see - # https://github.com/ytdl-org/youtube-dl/issues/6057#issuecomment-126129799) + # https://github.com/ytdl-org/haruhi-dl/issues/6057#issuecomment-126129799) if has_range: content_range = ctx.data.headers.get('Content-Range') if content_range: @@ -265,7 +265,7 @@ class HttpFD(FileDownloader): if self.params.get('xattr_set_filesize', False) and data_len is not None: try: - write_xattr(ctx.tmpfilename, 'user.ytdl.filesize', str(data_len).encode('utf-8')) + write_xattr(ctx.tmpfilename, 'user.hdl.filesize', str(data_len).encode('utf-8')) except (XAttrUnavailableError, XAttrMetadataError) as err: self.report_error('unable to set filesize xattr: %s' % str(err)) diff --git a/youtube_dl/downloader/ism.py b/haruhi_dl/downloader/ism.py similarity index 100% rename from youtube_dl/downloader/ism.py rename to haruhi_dl/downloader/ism.py diff --git a/youtube_dl/downloader/rtmp.py b/haruhi_dl/downloader/rtmp.py similarity index 100% rename from youtube_dl/downloader/rtmp.py rename to haruhi_dl/downloader/rtmp.py diff --git a/youtube_dl/downloader/rtsp.py b/haruhi_dl/downloader/rtsp.py similarity index 100% rename from youtube_dl/downloader/rtsp.py rename to haruhi_dl/downloader/rtsp.py diff --git a/youtube_dl/extractor/__init__.py b/haruhi_dl/extractor/__init__.py similarity index 100% rename from youtube_dl/extractor/__init__.py rename to haruhi_dl/extractor/__init__.py diff --git a/youtube_dl/extractor/abc.py b/haruhi_dl/extractor/abc.py similarity index 100% rename from youtube_dl/extractor/abc.py rename to haruhi_dl/extractor/abc.py diff --git a/youtube_dl/extractor/abcnews.py b/haruhi_dl/extractor/abcnews.py similarity index 100% rename from youtube_dl/extractor/abcnews.py rename to haruhi_dl/extractor/abcnews.py diff --git a/youtube_dl/extractor/abcotvs.py b/haruhi_dl/extractor/abcotvs.py similarity index 100% rename from youtube_dl/extractor/abcotvs.py rename to haruhi_dl/extractor/abcotvs.py diff --git a/youtube_dl/extractor/academicearth.py b/haruhi_dl/extractor/academicearth.py similarity index 100% rename from youtube_dl/extractor/academicearth.py rename to haruhi_dl/extractor/academicearth.py diff --git a/youtube_dl/extractor/acast.py b/haruhi_dl/extractor/acast.py similarity index 100% rename from youtube_dl/extractor/acast.py rename to haruhi_dl/extractor/acast.py diff --git a/youtube_dl/extractor/adn.py b/haruhi_dl/extractor/adn.py similarity index 100% rename from youtube_dl/extractor/adn.py rename to haruhi_dl/extractor/adn.py diff --git a/youtube_dl/extractor/adobeconnect.py b/haruhi_dl/extractor/adobeconnect.py similarity index 100% rename from youtube_dl/extractor/adobeconnect.py rename to haruhi_dl/extractor/adobeconnect.py diff --git a/youtube_dl/extractor/adobepass.py b/haruhi_dl/extractor/adobepass.py similarity index 100% rename from youtube_dl/extractor/adobepass.py rename to haruhi_dl/extractor/adobepass.py diff --git a/youtube_dl/extractor/adobetv.py b/haruhi_dl/extractor/adobetv.py similarity index 100% rename from youtube_dl/extractor/adobetv.py rename to haruhi_dl/extractor/adobetv.py diff --git a/youtube_dl/extractor/adultswim.py b/haruhi_dl/extractor/adultswim.py similarity index 100% rename from youtube_dl/extractor/adultswim.py rename to haruhi_dl/extractor/adultswim.py diff --git a/youtube_dl/extractor/aenetworks.py b/haruhi_dl/extractor/aenetworks.py similarity index 100% rename from youtube_dl/extractor/aenetworks.py rename to haruhi_dl/extractor/aenetworks.py diff --git a/youtube_dl/extractor/afreecatv.py b/haruhi_dl/extractor/afreecatv.py similarity index 100% rename from youtube_dl/extractor/afreecatv.py rename to haruhi_dl/extractor/afreecatv.py diff --git a/youtube_dl/extractor/airmozilla.py b/haruhi_dl/extractor/airmozilla.py similarity index 100% rename from youtube_dl/extractor/airmozilla.py rename to haruhi_dl/extractor/airmozilla.py diff --git a/youtube_dl/extractor/aliexpress.py b/haruhi_dl/extractor/aliexpress.py similarity index 100% rename from youtube_dl/extractor/aliexpress.py rename to haruhi_dl/extractor/aliexpress.py diff --git a/youtube_dl/extractor/aljazeera.py b/haruhi_dl/extractor/aljazeera.py similarity index 100% rename from youtube_dl/extractor/aljazeera.py rename to haruhi_dl/extractor/aljazeera.py diff --git a/youtube_dl/extractor/allocine.py b/haruhi_dl/extractor/allocine.py similarity index 100% rename from youtube_dl/extractor/allocine.py rename to haruhi_dl/extractor/allocine.py diff --git a/youtube_dl/extractor/alphaporno.py b/haruhi_dl/extractor/alphaporno.py similarity index 100% rename from youtube_dl/extractor/alphaporno.py rename to haruhi_dl/extractor/alphaporno.py diff --git a/youtube_dl/extractor/amcnetworks.py b/haruhi_dl/extractor/amcnetworks.py similarity index 100% rename from youtube_dl/extractor/amcnetworks.py rename to haruhi_dl/extractor/amcnetworks.py diff --git a/youtube_dl/extractor/americastestkitchen.py b/haruhi_dl/extractor/americastestkitchen.py similarity index 100% rename from youtube_dl/extractor/americastestkitchen.py rename to haruhi_dl/extractor/americastestkitchen.py diff --git a/youtube_dl/extractor/amp.py b/haruhi_dl/extractor/amp.py similarity index 100% rename from youtube_dl/extractor/amp.py rename to haruhi_dl/extractor/amp.py diff --git a/youtube_dl/extractor/animeondemand.py b/haruhi_dl/extractor/animeondemand.py similarity index 100% rename from youtube_dl/extractor/animeondemand.py rename to haruhi_dl/extractor/animeondemand.py diff --git a/youtube_dl/extractor/anvato.py b/haruhi_dl/extractor/anvato.py similarity index 100% rename from youtube_dl/extractor/anvato.py rename to haruhi_dl/extractor/anvato.py diff --git a/youtube_dl/extractor/aol.py b/haruhi_dl/extractor/aol.py similarity index 100% rename from youtube_dl/extractor/aol.py rename to haruhi_dl/extractor/aol.py diff --git a/youtube_dl/extractor/apa.py b/haruhi_dl/extractor/apa.py similarity index 100% rename from youtube_dl/extractor/apa.py rename to haruhi_dl/extractor/apa.py diff --git a/youtube_dl/extractor/aparat.py b/haruhi_dl/extractor/aparat.py similarity index 100% rename from youtube_dl/extractor/aparat.py rename to haruhi_dl/extractor/aparat.py diff --git a/youtube_dl/extractor/appleconnect.py b/haruhi_dl/extractor/appleconnect.py similarity index 100% rename from youtube_dl/extractor/appleconnect.py rename to haruhi_dl/extractor/appleconnect.py diff --git a/youtube_dl/extractor/appletrailers.py b/haruhi_dl/extractor/appletrailers.py similarity index 99% rename from youtube_dl/extractor/appletrailers.py rename to haruhi_dl/extractor/appletrailers.py index a9ef733e0..2ddf92faa 100644 --- a/youtube_dl/extractor/appletrailers.py +++ b/haruhi_dl/extractor/appletrailers.py @@ -199,7 +199,7 @@ class AppleTrailersIE(InfoExtractor): 'upload_date': upload_date, 'uploader_id': uploader_id, 'http_headers': { - 'User-Agent': 'QuickTime compatible (youtube-dl)', + 'User-Agent': 'QuickTime compatible (haruhi-dl)', }, }) diff --git a/youtube_dl/extractor/archiveorg.py b/haruhi_dl/extractor/archiveorg.py similarity index 100% rename from youtube_dl/extractor/archiveorg.py rename to haruhi_dl/extractor/archiveorg.py diff --git a/youtube_dl/extractor/ard.py b/haruhi_dl/extractor/ard.py similarity index 100% rename from youtube_dl/extractor/ard.py rename to haruhi_dl/extractor/ard.py diff --git a/youtube_dl/extractor/arkena.py b/haruhi_dl/extractor/arkena.py similarity index 98% rename from youtube_dl/extractor/arkena.py rename to haruhi_dl/extractor/arkena.py index 854f58767..df8e1ec66 100644 --- a/youtube_dl/extractor/arkena.py +++ b/haruhi_dl/extractor/arkena.py @@ -103,7 +103,7 @@ class ArkenaIE(InfoExtractor): f_url, video_id, mpd_id=kind, fatal=False)) elif kind == 'silverlight': # TODO: process when ism is supported (see - # https://github.com/ytdl-org/youtube-dl/issues/8118) + # https://github.com/ytdl-org/haruhi-dl/issues/8118) continue else: tbr = float_or_none(f.get('Bitrate'), 1000) diff --git a/youtube_dl/extractor/arte.py b/haruhi_dl/extractor/arte.py similarity index 100% rename from youtube_dl/extractor/arte.py rename to haruhi_dl/extractor/arte.py diff --git a/youtube_dl/extractor/asiancrush.py b/haruhi_dl/extractor/asiancrush.py similarity index 100% rename from youtube_dl/extractor/asiancrush.py rename to haruhi_dl/extractor/asiancrush.py diff --git a/youtube_dl/extractor/atresplayer.py b/haruhi_dl/extractor/atresplayer.py similarity index 100% rename from youtube_dl/extractor/atresplayer.py rename to haruhi_dl/extractor/atresplayer.py diff --git a/youtube_dl/extractor/atttechchannel.py b/haruhi_dl/extractor/atttechchannel.py similarity index 100% rename from youtube_dl/extractor/atttechchannel.py rename to haruhi_dl/extractor/atttechchannel.py diff --git a/youtube_dl/extractor/atvat.py b/haruhi_dl/extractor/atvat.py similarity index 100% rename from youtube_dl/extractor/atvat.py rename to haruhi_dl/extractor/atvat.py diff --git a/youtube_dl/extractor/audimedia.py b/haruhi_dl/extractor/audimedia.py similarity index 100% rename from youtube_dl/extractor/audimedia.py rename to haruhi_dl/extractor/audimedia.py diff --git a/youtube_dl/extractor/audioboom.py b/haruhi_dl/extractor/audioboom.py similarity index 100% rename from youtube_dl/extractor/audioboom.py rename to haruhi_dl/extractor/audioboom.py diff --git a/youtube_dl/extractor/audiomack.py b/haruhi_dl/extractor/audiomack.py similarity index 100% rename from youtube_dl/extractor/audiomack.py rename to haruhi_dl/extractor/audiomack.py diff --git a/youtube_dl/extractor/awaan.py b/haruhi_dl/extractor/awaan.py similarity index 100% rename from youtube_dl/extractor/awaan.py rename to haruhi_dl/extractor/awaan.py diff --git a/youtube_dl/extractor/aws.py b/haruhi_dl/extractor/aws.py similarity index 100% rename from youtube_dl/extractor/aws.py rename to haruhi_dl/extractor/aws.py diff --git a/youtube_dl/extractor/azmedien.py b/haruhi_dl/extractor/azmedien.py similarity index 100% rename from youtube_dl/extractor/azmedien.py rename to haruhi_dl/extractor/azmedien.py diff --git a/youtube_dl/extractor/baidu.py b/haruhi_dl/extractor/baidu.py similarity index 100% rename from youtube_dl/extractor/baidu.py rename to haruhi_dl/extractor/baidu.py diff --git a/youtube_dl/extractor/bandcamp.py b/haruhi_dl/extractor/bandcamp.py similarity index 98% rename from youtube_dl/extractor/bandcamp.py rename to haruhi_dl/extractor/bandcamp.py index f14b407dc..9ac93645e 100644 --- a/youtube_dl/extractor/bandcamp.py +++ b/haruhi_dl/extractor/bandcamp.py @@ -28,12 +28,12 @@ from ..utils import ( class BandcampIE(InfoExtractor): _VALID_URL = r'https?://[^/]+\.bandcamp\.com/track/(?P[^/?#&]+)' _TESTS = [{ - 'url': 'http://youtube-dl.bandcamp.com/track/youtube-dl-test-song', + 'url': 'http://haruhi-dl.bandcamp.com/track/haruhi-dl-test-song', 'md5': 'c557841d5e50261777a6585648adf439', 'info_dict': { 'id': '1812978515', 'ext': 'mp3', - 'title': "youtube-dl \"'/\\\u00e4\u21ad - youtube-dl test song \"'/\\\u00e4\u21ad", + 'title': "haruhi-dl \"'/\\\u00e4\u21ad - haruhi-dl test song \"'/\\\u00e4\u21ad", 'duration': 9.8485, }, '_skip': 'There is a limit of 200 free downloads / month for the test song' diff --git a/youtube_dl/extractor/bbc.py b/haruhi_dl/extractor/bbc.py similarity index 99% rename from youtube_dl/extractor/bbc.py rename to haruhi_dl/extractor/bbc.py index 002c39c39..1ff7834bf 100644 --- a/youtube_dl/extractor/bbc.py +++ b/haruhi_dl/extractor/bbc.py @@ -209,7 +209,7 @@ class BBCCoUkIE(InfoExtractor): }, 'skip': 'Now it\'s really geo-restricted', }, { - # compact player (https://github.com/ytdl-org/youtube-dl/issues/8147) + # compact player (https://github.com/ytdl-org/haruhi-dl/issues/8147) 'url': 'http://www.bbc.co.uk/programmes/p028bfkf/player', 'info_dict': { 'id': 'p028bfkj', diff --git a/youtube_dl/extractor/beampro.py b/haruhi_dl/extractor/beampro.py similarity index 100% rename from youtube_dl/extractor/beampro.py rename to haruhi_dl/extractor/beampro.py diff --git a/youtube_dl/extractor/beatport.py b/haruhi_dl/extractor/beatport.py similarity index 100% rename from youtube_dl/extractor/beatport.py rename to haruhi_dl/extractor/beatport.py diff --git a/youtube_dl/extractor/beeg.py b/haruhi_dl/extractor/beeg.py similarity index 100% rename from youtube_dl/extractor/beeg.py rename to haruhi_dl/extractor/beeg.py diff --git a/youtube_dl/extractor/behindkink.py b/haruhi_dl/extractor/behindkink.py similarity index 100% rename from youtube_dl/extractor/behindkink.py rename to haruhi_dl/extractor/behindkink.py diff --git a/youtube_dl/extractor/bellmedia.py b/haruhi_dl/extractor/bellmedia.py similarity index 100% rename from youtube_dl/extractor/bellmedia.py rename to haruhi_dl/extractor/bellmedia.py diff --git a/youtube_dl/extractor/bet.py b/haruhi_dl/extractor/bet.py similarity index 100% rename from youtube_dl/extractor/bet.py rename to haruhi_dl/extractor/bet.py diff --git a/youtube_dl/extractor/bfi.py b/haruhi_dl/extractor/bfi.py similarity index 100% rename from youtube_dl/extractor/bfi.py rename to haruhi_dl/extractor/bfi.py diff --git a/youtube_dl/extractor/bigflix.py b/haruhi_dl/extractor/bigflix.py similarity index 100% rename from youtube_dl/extractor/bigflix.py rename to haruhi_dl/extractor/bigflix.py diff --git a/youtube_dl/extractor/bild.py b/haruhi_dl/extractor/bild.py similarity index 100% rename from youtube_dl/extractor/bild.py rename to haruhi_dl/extractor/bild.py diff --git a/youtube_dl/extractor/bilibili.py b/haruhi_dl/extractor/bilibili.py similarity index 99% rename from youtube_dl/extractor/bilibili.py rename to haruhi_dl/extractor/bilibili.py index 4dc597e16..341f9c9ce 100644 --- a/youtube_dl/extractor/bilibili.py +++ b/haruhi_dl/extractor/bilibili.py @@ -139,7 +139,7 @@ class BiliBiliIE(InfoExtractor): webpage, 'player parameters'))['cid'][0] else: if 'no_bangumi_tip' not in smuggled_data: - self.to_screen('Downloading episode %s. To download all videos in anime %s, re-run youtube-dl with %s' % ( + self.to_screen('Downloading episode %s. To download all videos in anime %s, re-run haruhi-dl with %s' % ( video_id, anime_id, compat_urlparse.urljoin(url, '//bangumi.bilibili.com/anime/%s' % anime_id))) headers = { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', diff --git a/youtube_dl/extractor/biobiochiletv.py b/haruhi_dl/extractor/biobiochiletv.py similarity index 100% rename from youtube_dl/extractor/biobiochiletv.py rename to haruhi_dl/extractor/biobiochiletv.py diff --git a/youtube_dl/extractor/biqle.py b/haruhi_dl/extractor/biqle.py similarity index 100% rename from youtube_dl/extractor/biqle.py rename to haruhi_dl/extractor/biqle.py diff --git a/youtube_dl/extractor/bitchute.py b/haruhi_dl/extractor/bitchute.py similarity index 100% rename from youtube_dl/extractor/bitchute.py rename to haruhi_dl/extractor/bitchute.py diff --git a/youtube_dl/extractor/bleacherreport.py b/haruhi_dl/extractor/bleacherreport.py similarity index 100% rename from youtube_dl/extractor/bleacherreport.py rename to haruhi_dl/extractor/bleacherreport.py diff --git a/youtube_dl/extractor/blinkx.py b/haruhi_dl/extractor/blinkx.py similarity index 100% rename from youtube_dl/extractor/blinkx.py rename to haruhi_dl/extractor/blinkx.py diff --git a/youtube_dl/extractor/bloomberg.py b/haruhi_dl/extractor/bloomberg.py similarity index 100% rename from youtube_dl/extractor/bloomberg.py rename to haruhi_dl/extractor/bloomberg.py diff --git a/youtube_dl/extractor/bokecc.py b/haruhi_dl/extractor/bokecc.py similarity index 100% rename from youtube_dl/extractor/bokecc.py rename to haruhi_dl/extractor/bokecc.py diff --git a/youtube_dl/extractor/bostonglobe.py b/haruhi_dl/extractor/bostonglobe.py similarity index 100% rename from youtube_dl/extractor/bostonglobe.py rename to haruhi_dl/extractor/bostonglobe.py diff --git a/youtube_dl/extractor/bpb.py b/haruhi_dl/extractor/bpb.py similarity index 100% rename from youtube_dl/extractor/bpb.py rename to haruhi_dl/extractor/bpb.py diff --git a/youtube_dl/extractor/br.py b/haruhi_dl/extractor/br.py similarity index 100% rename from youtube_dl/extractor/br.py rename to haruhi_dl/extractor/br.py diff --git a/youtube_dl/extractor/bravotv.py b/haruhi_dl/extractor/bravotv.py similarity index 100% rename from youtube_dl/extractor/bravotv.py rename to haruhi_dl/extractor/bravotv.py diff --git a/youtube_dl/extractor/breakcom.py b/haruhi_dl/extractor/breakcom.py similarity index 100% rename from youtube_dl/extractor/breakcom.py rename to haruhi_dl/extractor/breakcom.py diff --git a/youtube_dl/extractor/brightcove.py b/haruhi_dl/extractor/brightcove.py similarity index 99% rename from youtube_dl/extractor/brightcove.py rename to haruhi_dl/extractor/brightcove.py index 2aa9f4782..ee2867ecc 100644 --- a/youtube_dl/extractor/brightcove.py +++ b/haruhi_dl/extractor/brightcove.py @@ -129,7 +129,7 @@ class BrightcoveLegacyIE(InfoExtractor): 'skip': 'Unsupported URL', }, { - # playlist with 'playlistTab' (https://github.com/ytdl-org/youtube-dl/issues/9965) + # playlist with 'playlistTab' (https://github.com/ytdl-org/haruhi-dl/issues/9965) 'url': 'http://c.brightcove.com/services/json/experience/runtime/?command=get_programming_for_experience&playerKey=AQ%7E%7E,AAABXlLMdok%7E,NJ4EoMlZ4rZdx9eU1rkMVd8EaYPBBUlg', 'info_dict': { 'id': '1522758701001', @@ -153,10 +153,10 @@ class BrightcoveLegacyIE(InfoExtractor): <object class="BrightcoveExperience">{params}</object> """ - # Fix up some stupid HTML, see https://github.com/ytdl-org/youtube-dl/issues/1553 + # Fix up some stupid HTML, see https://github.com/ytdl-org/haruhi-dl/issues/1553 object_str = re.sub(r'(<param(?:\s+[a-zA-Z0-9_]+="[^"]*")*)>', lambda m: m.group(1) + '/>', object_str) - # Fix up some stupid XML, see https://github.com/ytdl-org/youtube-dl/issues/1608 + # Fix up some stupid XML, see https://github.com/ytdl-org/haruhi-dl/issues/1608 object_str = object_str.replace('<--', '<!--') # remove namespace to simplify extraction object_str = re.sub(r'(<object[^>]*)(xmlns=".*?")', r'\1', object_str) diff --git a/youtube_dl/extractor/businessinsider.py b/haruhi_dl/extractor/businessinsider.py similarity index 100% rename from youtube_dl/extractor/businessinsider.py rename to haruhi_dl/extractor/businessinsider.py diff --git a/youtube_dl/extractor/buzzfeed.py b/haruhi_dl/extractor/buzzfeed.py similarity index 100% rename from youtube_dl/extractor/buzzfeed.py rename to haruhi_dl/extractor/buzzfeed.py diff --git a/youtube_dl/extractor/byutv.py b/haruhi_dl/extractor/byutv.py similarity index 100% rename from youtube_dl/extractor/byutv.py rename to haruhi_dl/extractor/byutv.py diff --git a/youtube_dl/extractor/c56.py b/haruhi_dl/extractor/c56.py similarity index 100% rename from youtube_dl/extractor/c56.py rename to haruhi_dl/extractor/c56.py diff --git a/youtube_dl/extractor/camdemy.py b/haruhi_dl/extractor/camdemy.py similarity index 100% rename from youtube_dl/extractor/camdemy.py rename to haruhi_dl/extractor/camdemy.py diff --git a/youtube_dl/extractor/cammodels.py b/haruhi_dl/extractor/cammodels.py similarity index 100% rename from youtube_dl/extractor/cammodels.py rename to haruhi_dl/extractor/cammodels.py diff --git a/youtube_dl/extractor/camtube.py b/haruhi_dl/extractor/camtube.py similarity index 100% rename from youtube_dl/extractor/camtube.py rename to haruhi_dl/extractor/camtube.py diff --git a/youtube_dl/extractor/camwithher.py b/haruhi_dl/extractor/camwithher.py similarity index 100% rename from youtube_dl/extractor/camwithher.py rename to haruhi_dl/extractor/camwithher.py diff --git a/youtube_dl/extractor/canalc2.py b/haruhi_dl/extractor/canalc2.py similarity index 100% rename from youtube_dl/extractor/canalc2.py rename to haruhi_dl/extractor/canalc2.py diff --git a/youtube_dl/extractor/canalplus.py b/haruhi_dl/extractor/canalplus.py similarity index 100% rename from youtube_dl/extractor/canalplus.py rename to haruhi_dl/extractor/canalplus.py diff --git a/youtube_dl/extractor/canvas.py b/haruhi_dl/extractor/canvas.py similarity index 100% rename from youtube_dl/extractor/canvas.py rename to haruhi_dl/extractor/canvas.py diff --git a/youtube_dl/extractor/carambatv.py b/haruhi_dl/extractor/carambatv.py similarity index 100% rename from youtube_dl/extractor/carambatv.py rename to haruhi_dl/extractor/carambatv.py diff --git a/youtube_dl/extractor/cartoonnetwork.py b/haruhi_dl/extractor/cartoonnetwork.py similarity index 100% rename from youtube_dl/extractor/cartoonnetwork.py rename to haruhi_dl/extractor/cartoonnetwork.py diff --git a/youtube_dl/extractor/cbc.py b/haruhi_dl/extractor/cbc.py similarity index 100% rename from youtube_dl/extractor/cbc.py rename to haruhi_dl/extractor/cbc.py diff --git a/youtube_dl/extractor/cbs.py b/haruhi_dl/extractor/cbs.py similarity index 100% rename from youtube_dl/extractor/cbs.py rename to haruhi_dl/extractor/cbs.py diff --git a/youtube_dl/extractor/cbsinteractive.py b/haruhi_dl/extractor/cbsinteractive.py similarity index 100% rename from youtube_dl/extractor/cbsinteractive.py rename to haruhi_dl/extractor/cbsinteractive.py diff --git a/youtube_dl/extractor/cbslocal.py b/haruhi_dl/extractor/cbslocal.py similarity index 100% rename from youtube_dl/extractor/cbslocal.py rename to haruhi_dl/extractor/cbslocal.py diff --git a/youtube_dl/extractor/cbsnews.py b/haruhi_dl/extractor/cbsnews.py similarity index 100% rename from youtube_dl/extractor/cbsnews.py rename to haruhi_dl/extractor/cbsnews.py diff --git a/youtube_dl/extractor/cbssports.py b/haruhi_dl/extractor/cbssports.py similarity index 100% rename from youtube_dl/extractor/cbssports.py rename to haruhi_dl/extractor/cbssports.py diff --git a/youtube_dl/extractor/ccc.py b/haruhi_dl/extractor/ccc.py similarity index 100% rename from youtube_dl/extractor/ccc.py rename to haruhi_dl/extractor/ccc.py diff --git a/youtube_dl/extractor/ccma.py b/haruhi_dl/extractor/ccma.py similarity index 100% rename from youtube_dl/extractor/ccma.py rename to haruhi_dl/extractor/ccma.py diff --git a/youtube_dl/extractor/cctv.py b/haruhi_dl/extractor/cctv.py similarity index 100% rename from youtube_dl/extractor/cctv.py rename to haruhi_dl/extractor/cctv.py diff --git a/youtube_dl/extractor/cda.py b/haruhi_dl/extractor/cda.py similarity index 100% rename from youtube_dl/extractor/cda.py rename to haruhi_dl/extractor/cda.py diff --git a/youtube_dl/extractor/ceskatelevize.py b/haruhi_dl/extractor/ceskatelevize.py similarity index 99% rename from youtube_dl/extractor/ceskatelevize.py rename to haruhi_dl/extractor/ceskatelevize.py index 7cb4efb74..f2fab670d 100644 --- a/youtube_dl/extractor/ceskatelevize.py +++ b/haruhi_dl/extractor/ceskatelevize.py @@ -157,7 +157,7 @@ class CeskaTelevizeIE(InfoExtractor): stream_formats = self._extract_mpd_formats( stream_url, playlist_id, mpd_id='dash-%s' % format_id, fatal=False) - # See https://github.com/ytdl-org/youtube-dl/issues/12119#issuecomment-280037031 + # See https://github.com/ytdl-org/haruhi-dl/issues/12119#issuecomment-280037031 if format_id == 'audioDescription': for f in stream_formats: f['source_preference'] = -10 diff --git a/youtube_dl/extractor/channel9.py b/haruhi_dl/extractor/channel9.py similarity index 100% rename from youtube_dl/extractor/channel9.py rename to haruhi_dl/extractor/channel9.py diff --git a/youtube_dl/extractor/charlierose.py b/haruhi_dl/extractor/charlierose.py similarity index 100% rename from youtube_dl/extractor/charlierose.py rename to haruhi_dl/extractor/charlierose.py diff --git a/youtube_dl/extractor/chaturbate.py b/haruhi_dl/extractor/chaturbate.py similarity index 100% rename from youtube_dl/extractor/chaturbate.py rename to haruhi_dl/extractor/chaturbate.py diff --git a/youtube_dl/extractor/chilloutzone.py b/haruhi_dl/extractor/chilloutzone.py similarity index 100% rename from youtube_dl/extractor/chilloutzone.py rename to haruhi_dl/extractor/chilloutzone.py diff --git a/youtube_dl/extractor/chirbit.py b/haruhi_dl/extractor/chirbit.py similarity index 100% rename from youtube_dl/extractor/chirbit.py rename to haruhi_dl/extractor/chirbit.py diff --git a/youtube_dl/extractor/cinchcast.py b/haruhi_dl/extractor/cinchcast.py similarity index 100% rename from youtube_dl/extractor/cinchcast.py rename to haruhi_dl/extractor/cinchcast.py diff --git a/youtube_dl/extractor/cinemax.py b/haruhi_dl/extractor/cinemax.py similarity index 100% rename from youtube_dl/extractor/cinemax.py rename to haruhi_dl/extractor/cinemax.py diff --git a/youtube_dl/extractor/ciscolive.py b/haruhi_dl/extractor/ciscolive.py similarity index 100% rename from youtube_dl/extractor/ciscolive.py rename to haruhi_dl/extractor/ciscolive.py diff --git a/youtube_dl/extractor/cjsw.py b/haruhi_dl/extractor/cjsw.py similarity index 100% rename from youtube_dl/extractor/cjsw.py rename to haruhi_dl/extractor/cjsw.py diff --git a/youtube_dl/extractor/cliphunter.py b/haruhi_dl/extractor/cliphunter.py similarity index 100% rename from youtube_dl/extractor/cliphunter.py rename to haruhi_dl/extractor/cliphunter.py diff --git a/youtube_dl/extractor/clippit.py b/haruhi_dl/extractor/clippit.py similarity index 100% rename from youtube_dl/extractor/clippit.py rename to haruhi_dl/extractor/clippit.py diff --git a/youtube_dl/extractor/cliprs.py b/haruhi_dl/extractor/cliprs.py similarity index 100% rename from youtube_dl/extractor/cliprs.py rename to haruhi_dl/extractor/cliprs.py diff --git a/youtube_dl/extractor/clipsyndicate.py b/haruhi_dl/extractor/clipsyndicate.py similarity index 100% rename from youtube_dl/extractor/clipsyndicate.py rename to haruhi_dl/extractor/clipsyndicate.py diff --git a/youtube_dl/extractor/closertotruth.py b/haruhi_dl/extractor/closertotruth.py similarity index 100% rename from youtube_dl/extractor/closertotruth.py rename to haruhi_dl/extractor/closertotruth.py diff --git a/youtube_dl/extractor/cloudflarestream.py b/haruhi_dl/extractor/cloudflarestream.py similarity index 100% rename from youtube_dl/extractor/cloudflarestream.py rename to haruhi_dl/extractor/cloudflarestream.py diff --git a/youtube_dl/extractor/cloudy.py b/haruhi_dl/extractor/cloudy.py similarity index 100% rename from youtube_dl/extractor/cloudy.py rename to haruhi_dl/extractor/cloudy.py diff --git a/youtube_dl/extractor/clubic.py b/haruhi_dl/extractor/clubic.py similarity index 100% rename from youtube_dl/extractor/clubic.py rename to haruhi_dl/extractor/clubic.py diff --git a/youtube_dl/extractor/clyp.py b/haruhi_dl/extractor/clyp.py similarity index 100% rename from youtube_dl/extractor/clyp.py rename to haruhi_dl/extractor/clyp.py diff --git a/youtube_dl/extractor/cmt.py b/haruhi_dl/extractor/cmt.py similarity index 100% rename from youtube_dl/extractor/cmt.py rename to haruhi_dl/extractor/cmt.py diff --git a/youtube_dl/extractor/cnbc.py b/haruhi_dl/extractor/cnbc.py similarity index 100% rename from youtube_dl/extractor/cnbc.py rename to haruhi_dl/extractor/cnbc.py diff --git a/youtube_dl/extractor/cnn.py b/haruhi_dl/extractor/cnn.py similarity index 100% rename from youtube_dl/extractor/cnn.py rename to haruhi_dl/extractor/cnn.py diff --git a/youtube_dl/extractor/comedycentral.py b/haruhi_dl/extractor/comedycentral.py similarity index 100% rename from youtube_dl/extractor/comedycentral.py rename to haruhi_dl/extractor/comedycentral.py diff --git a/youtube_dl/extractor/common.py b/haruhi_dl/extractor/common.py similarity index 99% rename from youtube_dl/extractor/common.py rename to haruhi_dl/extractor/common.py index 021945a89..3679664e8 100644 --- a/youtube_dl/extractor/common.py +++ b/haruhi_dl/extractor/common.py @@ -91,7 +91,7 @@ class InfoExtractor(object): information about the video (or videos) the URL refers to. This information includes the real video URL, the video title, author and others. The information is stored in a dictionary which is then - passed to the YoutubeDL. The YoutubeDL processes this + passed to the HaruhiDL. The HaruhiDL processes this information possibly downloading the video to the file system, among other possible outcomes. @@ -271,9 +271,9 @@ class InfoExtractor(object): Set to "root" to indicate that this is a comment to the original video. age_limit: Age restriction for the video, as an integer (years) - webpage_url: The URL to the video webpage, if given to youtube-dl it + webpage_url: The URL to the video webpage, if given to haruhi-dl it should allow to get the same result again. (It will be set - by YoutubeDL if it's missing) + by HaruhiDL if it's missing) categories: A list of categories that the video falls in, for example ["Sports", "Berlin"] tags: A list of tags assigned to the video, e.g. ["sweden", "pop music"] @@ -1492,7 +1492,7 @@ class InfoExtractor(object): manifest_url, video_id, 'Downloading f4m manifest', 'Unable to download f4m manifest', # Some manifests may be malformed, e.g. prosiebensat1 generated manifests - # (see https://github.com/ytdl-org/youtube-dl/issues/6215#issuecomment-121704244) + # (see https://github.com/ytdl-org/haruhi-dl/issues/6215#issuecomment-121704244) transform_source=transform_source, fatal=fatal, data=data, headers=headers, query=query) @@ -1509,7 +1509,7 @@ class InfoExtractor(object): if not isinstance(manifest, compat_etree_Element) and not fatal: return [] - # currently youtube-dl cannot decode the playerVerificationChallenge as Akamai uses Adobe Alchemy + # currently haruhi-dl cannot decode the playerVerificationChallenge as Akamai uses Adobe Alchemy akamai_pv = manifest.find('{http://ns.adobe.com/f4m/1.0}pv-2.0') if akamai_pv is not None and ';' in akamai_pv.text: playerVerificationChallenge = akamai_pv.text.split(';')[0] @@ -1523,7 +1523,7 @@ class InfoExtractor(object): manifest_version = '2.0' media_nodes = manifest.findall('{http://ns.adobe.com/f4m/2.0}media') # Remove unsupported DRM protected media from final formats - # rendition (see https://github.com/ytdl-org/youtube-dl/issues/8573). + # rendition (see https://github.com/ytdl-org/haruhi-dl/issues/8573). media_nodes = remove_encrypted_media(media_nodes) if not media_nodes: return formats @@ -1654,8 +1654,8 @@ class InfoExtractor(object): # References: # 1. https://tools.ietf.org/html/draft-pantos-http-live-streaming-21 - # 2. https://github.com/ytdl-org/youtube-dl/issues/12211 - # 3. https://github.com/ytdl-org/youtube-dl/issues/18923 + # 2. https://github.com/ytdl-org/haruhi-dl/issues/12211 + # 3. https://github.com/ytdl-org/haruhi-dl/issues/18923 # We should try extracting formats only from master playlists [1, 4.3.4], # i.e. playlists that describe available qualities. On the other hand @@ -2211,7 +2211,7 @@ class InfoExtractor(object): # First of, % characters outside $...$ templates # must be escaped by doubling for proper processing # by % operator string formatting used further (see - # https://github.com/ytdl-org/youtube-dl/issues/16867). + # https://github.com/ytdl-org/haruhi-dl/issues/16867). t = '' in_template = False for c in tmpl: @@ -2230,7 +2230,7 @@ class InfoExtractor(object): # @initialization is a regular template like @media one # so it should be handled just the same way (see - # https://github.com/ytdl-org/youtube-dl/issues/11605) + # https://github.com/ytdl-org/haruhi-dl/issues/11605) if 'initialization' in representation_ms_info: initialization_template = prepare_template( 'initialization', @@ -2316,7 +2316,7 @@ class InfoExtractor(object): elif 'segment_urls' in representation_ms_info: # Segment URLs with no SegmentTimeline # Example: https://www.seznam.cz/zpravy/clanek/cesko-zasahne-vitr-o-sile-vichrice-muze-byt-i-zivotu-nebezpecny-39091 - # https://github.com/ytdl-org/youtube-dl/pull/14844 + # https://github.com/ytdl-org/haruhi-dl/pull/14844 fragments = [] segment_duration = float_or_none( representation_ms_info['segment_duration'], @@ -2354,8 +2354,8 @@ class InfoExtractor(object): # According to [1, 5.3.5.2, Table 7, page 35] @id of Representation # is not necessarily unique within a Period thus formats with # the same `format_id` are quite possible. There are numerous examples - # of such manifests (see https://github.com/ytdl-org/youtube-dl/issues/15111, - # https://github.com/ytdl-org/youtube-dl/issues/13919) + # of such manifests (see https://github.com/ytdl-org/haruhi-dl/issues/15111, + # https://github.com/ytdl-org/haruhi-dl/issues/13919) full_info = formats_dict.get(representation_id, {}).copy() full_info.update(f) formats.append(full_info) @@ -2518,7 +2518,7 @@ class InfoExtractor(object): media_tags.extend(re.findall( # We only allow video|audio followed by a whitespace or '>'. # Allowing more characters may end up in significant slow down (see - # https://github.com/ytdl-org/youtube-dl/issues/11979, example URL: + # https://github.com/ytdl-org/haruhi-dl/issues/11979, example URL: # http://www.porntrex.com/maps/videositemap.xml). r'(?s)(<(?P<tag>(?:amp-)?(?:video|audio))(?:\s+[^>]*)?>)(.*?)</(?P=tag)>', webpage)) for media_tag, media_type, media_content in media_tags: @@ -2875,7 +2875,7 @@ class InfoExtractor(object): We will workaround this issue by resetting the cookie to the first one manually. 1. https://new.vk.com/ - 2. https://github.com/ytdl-org/youtube-dl/issues/9841#issuecomment-227871201 + 2. https://github.com/ytdl-org/haruhi-dl/issues/9841#issuecomment-227871201 3. https://learning.oreilly.com/ """ for header, cookies in url_handle.headers.items(): diff --git a/youtube_dl/extractor/commonmistakes.py b/haruhi_dl/extractor/commonmistakes.py similarity index 88% rename from youtube_dl/extractor/commonmistakes.py rename to haruhi_dl/extractor/commonmistakes.py index 7e12499b1..2ec4b8c67 100644 --- a/youtube_dl/extractor/commonmistakes.py +++ b/haruhi_dl/extractor/commonmistakes.py @@ -22,12 +22,12 @@ class CommonMistakesIE(InfoExtractor): def _real_extract(self, url): msg = ( - 'You\'ve asked youtube-dl to download the URL "%s". ' + 'You\'ve asked haruhi-dl to download the URL "%s". ' 'That doesn\'t make any sense. ' 'Simply remove the parameter in your command or configuration.' ) % url if not self._downloader.params.get('verbose'): - msg += ' Add -v to the command line to see what arguments and configuration youtube-dl got.' + msg += ' Add -v to the command line to see what arguments and configuration haruhi-dl got.' raise ExtractorError(msg, expected=True) @@ -36,7 +36,7 @@ class UnicodeBOMIE(InfoExtractor): _VALID_URL = r'(?P<bom>\ufeff)(?P<id>.*)$' # Disable test for python 3.2 since BOM is broken in re in this version - # (see https://github.com/ytdl-org/youtube-dl/issues/9751) + # (see https://github.com/ytdl-org/haruhi-dl/issues/9751) _TESTS = [] if (3, 0) < sys.version_info <= (3, 3) else [{ 'url': '\ufeffhttp://www.youtube.com/watch?v=BaW_jenozKc', 'only_matching': True, diff --git a/youtube_dl/extractor/commonprotocols.py b/haruhi_dl/extractor/commonprotocols.py similarity index 100% rename from youtube_dl/extractor/commonprotocols.py rename to haruhi_dl/extractor/commonprotocols.py diff --git a/youtube_dl/extractor/condenast.py b/haruhi_dl/extractor/condenast.py similarity index 100% rename from youtube_dl/extractor/condenast.py rename to haruhi_dl/extractor/condenast.py diff --git a/youtube_dl/extractor/contv.py b/haruhi_dl/extractor/contv.py similarity index 100% rename from youtube_dl/extractor/contv.py rename to haruhi_dl/extractor/contv.py diff --git a/youtube_dl/extractor/corus.py b/haruhi_dl/extractor/corus.py similarity index 100% rename from youtube_dl/extractor/corus.py rename to haruhi_dl/extractor/corus.py diff --git a/youtube_dl/extractor/coub.py b/haruhi_dl/extractor/coub.py similarity index 100% rename from youtube_dl/extractor/coub.py rename to haruhi_dl/extractor/coub.py diff --git a/youtube_dl/extractor/cracked.py b/haruhi_dl/extractor/cracked.py similarity index 100% rename from youtube_dl/extractor/cracked.py rename to haruhi_dl/extractor/cracked.py diff --git a/youtube_dl/extractor/crackle.py b/haruhi_dl/extractor/crackle.py similarity index 100% rename from youtube_dl/extractor/crackle.py rename to haruhi_dl/extractor/crackle.py diff --git a/youtube_dl/extractor/crooksandliars.py b/haruhi_dl/extractor/crooksandliars.py similarity index 100% rename from youtube_dl/extractor/crooksandliars.py rename to haruhi_dl/extractor/crooksandliars.py diff --git a/youtube_dl/extractor/crunchyroll.py b/haruhi_dl/extractor/crunchyroll.py similarity index 99% rename from youtube_dl/extractor/crunchyroll.py rename to haruhi_dl/extractor/crunchyroll.py index bc2d1fa8b..c829cf7fd 100644 --- a/youtube_dl/extractor/crunchyroll.py +++ b/haruhi_dl/extractor/crunchyroll.py @@ -112,7 +112,7 @@ class CrunchyrollBaseIE(InfoExtractor): # > This content may be inappropriate for some people. # > Are you sure you want to continue? # since it's not disabled by default in crunchyroll account's settings. - # See https://github.com/ytdl-org/youtube-dl/issues/7202. + # See https://github.com/ytdl-org/haruhi-dl/issues/7202. qs['skip_wall'] = ['1'] return compat_urlparse.urlunparse( parsed_url._replace(query=compat_urllib_parse_urlencode(qs, True))) @@ -267,7 +267,7 @@ class CrunchyrollIE(CrunchyrollBaseIE, VRVIE): request = (url_or_request if isinstance(url_or_request, compat_urllib_request.Request) else sanitized_Request(url_or_request)) # Accept-Language must be set explicitly to accept any language to avoid issues - # similar to https://github.com/ytdl-org/youtube-dl/issues/6797. + # similar to https://github.com/ytdl-org/haruhi-dl/issues/6797. # Along with IP address Crunchyroll uses Accept-Language to guess whether georestriction # should be imposed or not (from what I can see it just takes the first language # ignoring the priority and requires it to correspond the IP). By the way this causes diff --git a/youtube_dl/extractor/cspan.py b/haruhi_dl/extractor/cspan.py similarity index 100% rename from youtube_dl/extractor/cspan.py rename to haruhi_dl/extractor/cspan.py diff --git a/youtube_dl/extractor/ctsnews.py b/haruhi_dl/extractor/ctsnews.py similarity index 100% rename from youtube_dl/extractor/ctsnews.py rename to haruhi_dl/extractor/ctsnews.py diff --git a/youtube_dl/extractor/ctvnews.py b/haruhi_dl/extractor/ctvnews.py similarity index 100% rename from youtube_dl/extractor/ctvnews.py rename to haruhi_dl/extractor/ctvnews.py diff --git a/youtube_dl/extractor/cultureunplugged.py b/haruhi_dl/extractor/cultureunplugged.py similarity index 100% rename from youtube_dl/extractor/cultureunplugged.py rename to haruhi_dl/extractor/cultureunplugged.py diff --git a/youtube_dl/extractor/curiositystream.py b/haruhi_dl/extractor/curiositystream.py similarity index 100% rename from youtube_dl/extractor/curiositystream.py rename to haruhi_dl/extractor/curiositystream.py diff --git a/youtube_dl/extractor/cwtv.py b/haruhi_dl/extractor/cwtv.py similarity index 100% rename from youtube_dl/extractor/cwtv.py rename to haruhi_dl/extractor/cwtv.py diff --git a/youtube_dl/extractor/dailymail.py b/haruhi_dl/extractor/dailymail.py similarity index 100% rename from youtube_dl/extractor/dailymail.py rename to haruhi_dl/extractor/dailymail.py diff --git a/youtube_dl/extractor/dailymotion.py b/haruhi_dl/extractor/dailymotion.py similarity index 100% rename from youtube_dl/extractor/dailymotion.py rename to haruhi_dl/extractor/dailymotion.py diff --git a/youtube_dl/extractor/daum.py b/haruhi_dl/extractor/daum.py similarity index 100% rename from youtube_dl/extractor/daum.py rename to haruhi_dl/extractor/daum.py diff --git a/youtube_dl/extractor/dbtv.py b/haruhi_dl/extractor/dbtv.py similarity index 100% rename from youtube_dl/extractor/dbtv.py rename to haruhi_dl/extractor/dbtv.py diff --git a/youtube_dl/extractor/dctp.py b/haruhi_dl/extractor/dctp.py similarity index 100% rename from youtube_dl/extractor/dctp.py rename to haruhi_dl/extractor/dctp.py diff --git a/youtube_dl/extractor/deezer.py b/haruhi_dl/extractor/deezer.py similarity index 100% rename from youtube_dl/extractor/deezer.py rename to haruhi_dl/extractor/deezer.py diff --git a/youtube_dl/extractor/defense.py b/haruhi_dl/extractor/defense.py similarity index 100% rename from youtube_dl/extractor/defense.py rename to haruhi_dl/extractor/defense.py diff --git a/youtube_dl/extractor/democracynow.py b/haruhi_dl/extractor/democracynow.py similarity index 100% rename from youtube_dl/extractor/democracynow.py rename to haruhi_dl/extractor/democracynow.py diff --git a/youtube_dl/extractor/dfb.py b/haruhi_dl/extractor/dfb.py similarity index 100% rename from youtube_dl/extractor/dfb.py rename to haruhi_dl/extractor/dfb.py diff --git a/youtube_dl/extractor/dhm.py b/haruhi_dl/extractor/dhm.py similarity index 100% rename from youtube_dl/extractor/dhm.py rename to haruhi_dl/extractor/dhm.py diff --git a/youtube_dl/extractor/digg.py b/haruhi_dl/extractor/digg.py similarity index 100% rename from youtube_dl/extractor/digg.py rename to haruhi_dl/extractor/digg.py diff --git a/youtube_dl/extractor/digiteka.py b/haruhi_dl/extractor/digiteka.py similarity index 100% rename from youtube_dl/extractor/digiteka.py rename to haruhi_dl/extractor/digiteka.py diff --git a/youtube_dl/extractor/discovery.py b/haruhi_dl/extractor/discovery.py similarity index 100% rename from youtube_dl/extractor/discovery.py rename to haruhi_dl/extractor/discovery.py diff --git a/youtube_dl/extractor/discoverygo.py b/haruhi_dl/extractor/discoverygo.py similarity index 100% rename from youtube_dl/extractor/discoverygo.py rename to haruhi_dl/extractor/discoverygo.py diff --git a/youtube_dl/extractor/discoverynetworks.py b/haruhi_dl/extractor/discoverynetworks.py similarity index 100% rename from youtube_dl/extractor/discoverynetworks.py rename to haruhi_dl/extractor/discoverynetworks.py diff --git a/youtube_dl/extractor/discoveryvr.py b/haruhi_dl/extractor/discoveryvr.py similarity index 100% rename from youtube_dl/extractor/discoveryvr.py rename to haruhi_dl/extractor/discoveryvr.py diff --git a/youtube_dl/extractor/disney.py b/haruhi_dl/extractor/disney.py similarity index 100% rename from youtube_dl/extractor/disney.py rename to haruhi_dl/extractor/disney.py diff --git a/youtube_dl/extractor/dispeak.py b/haruhi_dl/extractor/dispeak.py similarity index 100% rename from youtube_dl/extractor/dispeak.py rename to haruhi_dl/extractor/dispeak.py diff --git a/youtube_dl/extractor/dlive.py b/haruhi_dl/extractor/dlive.py similarity index 100% rename from youtube_dl/extractor/dlive.py rename to haruhi_dl/extractor/dlive.py diff --git a/youtube_dl/extractor/dotsub.py b/haruhi_dl/extractor/dotsub.py similarity index 100% rename from youtube_dl/extractor/dotsub.py rename to haruhi_dl/extractor/dotsub.py diff --git a/youtube_dl/extractor/douyutv.py b/haruhi_dl/extractor/douyutv.py similarity index 100% rename from youtube_dl/extractor/douyutv.py rename to haruhi_dl/extractor/douyutv.py diff --git a/youtube_dl/extractor/dplay.py b/haruhi_dl/extractor/dplay.py similarity index 100% rename from youtube_dl/extractor/dplay.py rename to haruhi_dl/extractor/dplay.py diff --git a/youtube_dl/extractor/drbonanza.py b/haruhi_dl/extractor/drbonanza.py similarity index 100% rename from youtube_dl/extractor/drbonanza.py rename to haruhi_dl/extractor/drbonanza.py diff --git a/youtube_dl/extractor/dreisat.py b/haruhi_dl/extractor/dreisat.py similarity index 99% rename from youtube_dl/extractor/dreisat.py rename to haruhi_dl/extractor/dreisat.py index 848d387d1..85b4b1954 100644 --- a/youtube_dl/extractor/dreisat.py +++ b/haruhi_dl/extractor/dreisat.py @@ -114,7 +114,7 @@ class DreiSatIE(InfoExtractor): video_url, video_id, fatal=False)) elif ext == 'm3u8': # the certificates are misconfigured (see - # https://github.com/ytdl-org/youtube-dl/issues/8665) + # https://github.com/ytdl-org/haruhi-dl/issues/8665) if video_url.startswith('https://'): continue formats.extend(self._extract_m3u8_formats( diff --git a/youtube_dl/extractor/dropbox.py b/haruhi_dl/extractor/dropbox.py similarity index 85% rename from youtube_dl/extractor/dropbox.py rename to haruhi_dl/extractor/dropbox.py index 14b6c00b0..0b5a12d75 100644 --- a/youtube_dl/extractor/dropbox.py +++ b/haruhi_dl/extractor/dropbox.py @@ -13,11 +13,11 @@ class DropboxIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?dropbox[.]com/sh?/(?P<id>[a-zA-Z0-9]{15})/.*' _TESTS = [ { - 'url': 'https://www.dropbox.com/s/nelirfsxnmcfbfh/youtube-dl%20test%20video%20%27%C3%A4%22BaW_jenozKc.mp4?dl=0', + 'url': 'https://www.dropbox.com/s/nelirfsxnmcfbfh/haruhi-dl%20test%20video%20%27%C3%A4%22BaW_jenozKc.mp4?dl=0', 'info_dict': { 'id': 'nelirfsxnmcfbfh', 'ext': 'mp4', - 'title': 'youtube-dl test video \'ä"BaW_jenozKc' + 'title': 'haruhi-dl test video \'ä"BaW_jenozKc' } }, { 'url': 'https://www.dropbox.com/sh/662glsejgzoj9sr/AAByil3FGH9KFNZ13e08eSa1a/Pregame%20Ceremony%20Program%20PA%2020140518.m4v', diff --git a/youtube_dl/extractor/drtuber.py b/haruhi_dl/extractor/drtuber.py similarity index 100% rename from youtube_dl/extractor/drtuber.py rename to haruhi_dl/extractor/drtuber.py diff --git a/youtube_dl/extractor/drtv.py b/haruhi_dl/extractor/drtv.py similarity index 100% rename from youtube_dl/extractor/drtv.py rename to haruhi_dl/extractor/drtv.py diff --git a/youtube_dl/extractor/dtube.py b/haruhi_dl/extractor/dtube.py similarity index 100% rename from youtube_dl/extractor/dtube.py rename to haruhi_dl/extractor/dtube.py diff --git a/youtube_dl/extractor/dumpert.py b/haruhi_dl/extractor/dumpert.py similarity index 100% rename from youtube_dl/extractor/dumpert.py rename to haruhi_dl/extractor/dumpert.py diff --git a/youtube_dl/extractor/dvtv.py b/haruhi_dl/extractor/dvtv.py similarity index 100% rename from youtube_dl/extractor/dvtv.py rename to haruhi_dl/extractor/dvtv.py diff --git a/youtube_dl/extractor/dw.py b/haruhi_dl/extractor/dw.py similarity index 100% rename from youtube_dl/extractor/dw.py rename to haruhi_dl/extractor/dw.py diff --git a/youtube_dl/extractor/eagleplatform.py b/haruhi_dl/extractor/eagleplatform.py similarity index 100% rename from youtube_dl/extractor/eagleplatform.py rename to haruhi_dl/extractor/eagleplatform.py diff --git a/youtube_dl/extractor/ebaumsworld.py b/haruhi_dl/extractor/ebaumsworld.py similarity index 100% rename from youtube_dl/extractor/ebaumsworld.py rename to haruhi_dl/extractor/ebaumsworld.py diff --git a/youtube_dl/extractor/echomsk.py b/haruhi_dl/extractor/echomsk.py similarity index 100% rename from youtube_dl/extractor/echomsk.py rename to haruhi_dl/extractor/echomsk.py diff --git a/youtube_dl/extractor/egghead.py b/haruhi_dl/extractor/egghead.py similarity index 100% rename from youtube_dl/extractor/egghead.py rename to haruhi_dl/extractor/egghead.py diff --git a/youtube_dl/extractor/ehow.py b/haruhi_dl/extractor/ehow.py similarity index 100% rename from youtube_dl/extractor/ehow.py rename to haruhi_dl/extractor/ehow.py diff --git a/youtube_dl/extractor/eighttracks.py b/haruhi_dl/extractor/eighttracks.py similarity index 100% rename from youtube_dl/extractor/eighttracks.py rename to haruhi_dl/extractor/eighttracks.py diff --git a/youtube_dl/extractor/einthusan.py b/haruhi_dl/extractor/einthusan.py similarity index 100% rename from youtube_dl/extractor/einthusan.py rename to haruhi_dl/extractor/einthusan.py diff --git a/youtube_dl/extractor/eitb.py b/haruhi_dl/extractor/eitb.py similarity index 100% rename from youtube_dl/extractor/eitb.py rename to haruhi_dl/extractor/eitb.py diff --git a/youtube_dl/extractor/ellentube.py b/haruhi_dl/extractor/ellentube.py similarity index 100% rename from youtube_dl/extractor/ellentube.py rename to haruhi_dl/extractor/ellentube.py diff --git a/youtube_dl/extractor/elpais.py b/haruhi_dl/extractor/elpais.py similarity index 100% rename from youtube_dl/extractor/elpais.py rename to haruhi_dl/extractor/elpais.py diff --git a/youtube_dl/extractor/embedly.py b/haruhi_dl/extractor/embedly.py similarity index 100% rename from youtube_dl/extractor/embedly.py rename to haruhi_dl/extractor/embedly.py diff --git a/youtube_dl/extractor/engadget.py b/haruhi_dl/extractor/engadget.py similarity index 100% rename from youtube_dl/extractor/engadget.py rename to haruhi_dl/extractor/engadget.py diff --git a/youtube_dl/extractor/eporner.py b/haruhi_dl/extractor/eporner.py similarity index 100% rename from youtube_dl/extractor/eporner.py rename to haruhi_dl/extractor/eporner.py diff --git a/youtube_dl/extractor/eroprofile.py b/haruhi_dl/extractor/eroprofile.py similarity index 100% rename from youtube_dl/extractor/eroprofile.py rename to haruhi_dl/extractor/eroprofile.py diff --git a/youtube_dl/extractor/escapist.py b/haruhi_dl/extractor/escapist.py similarity index 100% rename from youtube_dl/extractor/escapist.py rename to haruhi_dl/extractor/escapist.py diff --git a/youtube_dl/extractor/espn.py b/haruhi_dl/extractor/espn.py similarity index 100% rename from youtube_dl/extractor/espn.py rename to haruhi_dl/extractor/espn.py diff --git a/youtube_dl/extractor/esri.py b/haruhi_dl/extractor/esri.py similarity index 100% rename from youtube_dl/extractor/esri.py rename to haruhi_dl/extractor/esri.py diff --git a/youtube_dl/extractor/europa.py b/haruhi_dl/extractor/europa.py similarity index 100% rename from youtube_dl/extractor/europa.py rename to haruhi_dl/extractor/europa.py diff --git a/youtube_dl/extractor/everyonesmixtape.py b/haruhi_dl/extractor/everyonesmixtape.py similarity index 100% rename from youtube_dl/extractor/everyonesmixtape.py rename to haruhi_dl/extractor/everyonesmixtape.py diff --git a/youtube_dl/extractor/expotv.py b/haruhi_dl/extractor/expotv.py similarity index 100% rename from youtube_dl/extractor/expotv.py rename to haruhi_dl/extractor/expotv.py diff --git a/youtube_dl/extractor/expressen.py b/haruhi_dl/extractor/expressen.py similarity index 100% rename from youtube_dl/extractor/expressen.py rename to haruhi_dl/extractor/expressen.py diff --git a/youtube_dl/extractor/extractors.py b/haruhi_dl/extractor/extractors.py similarity index 100% rename from youtube_dl/extractor/extractors.py rename to haruhi_dl/extractor/extractors.py diff --git a/youtube_dl/extractor/extremetube.py b/haruhi_dl/extractor/extremetube.py similarity index 100% rename from youtube_dl/extractor/extremetube.py rename to haruhi_dl/extractor/extremetube.py diff --git a/youtube_dl/extractor/eyedotv.py b/haruhi_dl/extractor/eyedotv.py similarity index 100% rename from youtube_dl/extractor/eyedotv.py rename to haruhi_dl/extractor/eyedotv.py diff --git a/youtube_dl/extractor/facebook.py b/haruhi_dl/extractor/facebook.py similarity index 100% rename from youtube_dl/extractor/facebook.py rename to haruhi_dl/extractor/facebook.py diff --git a/youtube_dl/extractor/faz.py b/haruhi_dl/extractor/faz.py similarity index 100% rename from youtube_dl/extractor/faz.py rename to haruhi_dl/extractor/faz.py diff --git a/youtube_dl/extractor/fc2.py b/haruhi_dl/extractor/fc2.py similarity index 100% rename from youtube_dl/extractor/fc2.py rename to haruhi_dl/extractor/fc2.py diff --git a/youtube_dl/extractor/fczenit.py b/haruhi_dl/extractor/fczenit.py similarity index 100% rename from youtube_dl/extractor/fczenit.py rename to haruhi_dl/extractor/fczenit.py diff --git a/youtube_dl/extractor/filmon.py b/haruhi_dl/extractor/filmon.py similarity index 100% rename from youtube_dl/extractor/filmon.py rename to haruhi_dl/extractor/filmon.py diff --git a/youtube_dl/extractor/filmweb.py b/haruhi_dl/extractor/filmweb.py similarity index 100% rename from youtube_dl/extractor/filmweb.py rename to haruhi_dl/extractor/filmweb.py diff --git a/youtube_dl/extractor/firsttv.py b/haruhi_dl/extractor/firsttv.py similarity index 100% rename from youtube_dl/extractor/firsttv.py rename to haruhi_dl/extractor/firsttv.py diff --git a/youtube_dl/extractor/fivemin.py b/haruhi_dl/extractor/fivemin.py similarity index 100% rename from youtube_dl/extractor/fivemin.py rename to haruhi_dl/extractor/fivemin.py diff --git a/youtube_dl/extractor/fivetv.py b/haruhi_dl/extractor/fivetv.py similarity index 100% rename from youtube_dl/extractor/fivetv.py rename to haruhi_dl/extractor/fivetv.py diff --git a/youtube_dl/extractor/flickr.py b/haruhi_dl/extractor/flickr.py similarity index 100% rename from youtube_dl/extractor/flickr.py rename to haruhi_dl/extractor/flickr.py diff --git a/youtube_dl/extractor/folketinget.py b/haruhi_dl/extractor/folketinget.py similarity index 100% rename from youtube_dl/extractor/folketinget.py rename to haruhi_dl/extractor/folketinget.py diff --git a/youtube_dl/extractor/footyroom.py b/haruhi_dl/extractor/footyroom.py similarity index 100% rename from youtube_dl/extractor/footyroom.py rename to haruhi_dl/extractor/footyroom.py diff --git a/youtube_dl/extractor/formula1.py b/haruhi_dl/extractor/formula1.py similarity index 100% rename from youtube_dl/extractor/formula1.py rename to haruhi_dl/extractor/formula1.py diff --git a/youtube_dl/extractor/fourtube.py b/haruhi_dl/extractor/fourtube.py similarity index 100% rename from youtube_dl/extractor/fourtube.py rename to haruhi_dl/extractor/fourtube.py diff --git a/youtube_dl/extractor/fox.py b/haruhi_dl/extractor/fox.py similarity index 100% rename from youtube_dl/extractor/fox.py rename to haruhi_dl/extractor/fox.py diff --git a/youtube_dl/extractor/fox9.py b/haruhi_dl/extractor/fox9.py similarity index 100% rename from youtube_dl/extractor/fox9.py rename to haruhi_dl/extractor/fox9.py diff --git a/youtube_dl/extractor/foxgay.py b/haruhi_dl/extractor/foxgay.py similarity index 100% rename from youtube_dl/extractor/foxgay.py rename to haruhi_dl/extractor/foxgay.py diff --git a/youtube_dl/extractor/foxnews.py b/haruhi_dl/extractor/foxnews.py similarity index 100% rename from youtube_dl/extractor/foxnews.py rename to haruhi_dl/extractor/foxnews.py diff --git a/youtube_dl/extractor/foxsports.py b/haruhi_dl/extractor/foxsports.py similarity index 100% rename from youtube_dl/extractor/foxsports.py rename to haruhi_dl/extractor/foxsports.py diff --git a/youtube_dl/extractor/franceculture.py b/haruhi_dl/extractor/franceculture.py similarity index 100% rename from youtube_dl/extractor/franceculture.py rename to haruhi_dl/extractor/franceculture.py diff --git a/youtube_dl/extractor/franceinter.py b/haruhi_dl/extractor/franceinter.py similarity index 100% rename from youtube_dl/extractor/franceinter.py rename to haruhi_dl/extractor/franceinter.py diff --git a/youtube_dl/extractor/francetv.py b/haruhi_dl/extractor/francetv.py similarity index 99% rename from youtube_dl/extractor/francetv.py rename to haruhi_dl/extractor/francetv.py index 81b468c7d..8598576e5 100644 --- a/youtube_dl/extractor/francetv.py +++ b/haruhi_dl/extractor/francetv.py @@ -143,7 +143,7 @@ class FranceTVIE(InfoExtractor): ext = determine_ext(video_url) if ext == 'f4m': if georestricted: - # See https://github.com/ytdl-org/youtube-dl/issues/3963 + # See https://github.com/ytdl-org/haruhi-dl/issues/3963 # m3u8 urls work fine continue formats.extend(self._extract_f4m_formats( diff --git a/youtube_dl/extractor/freesound.py b/haruhi_dl/extractor/freesound.py similarity index 100% rename from youtube_dl/extractor/freesound.py rename to haruhi_dl/extractor/freesound.py diff --git a/youtube_dl/extractor/freespeech.py b/haruhi_dl/extractor/freespeech.py similarity index 100% rename from youtube_dl/extractor/freespeech.py rename to haruhi_dl/extractor/freespeech.py diff --git a/youtube_dl/extractor/freshlive.py b/haruhi_dl/extractor/freshlive.py similarity index 100% rename from youtube_dl/extractor/freshlive.py rename to haruhi_dl/extractor/freshlive.py diff --git a/youtube_dl/extractor/frontendmasters.py b/haruhi_dl/extractor/frontendmasters.py similarity index 100% rename from youtube_dl/extractor/frontendmasters.py rename to haruhi_dl/extractor/frontendmasters.py diff --git a/youtube_dl/extractor/funimation.py b/haruhi_dl/extractor/funimation.py similarity index 100% rename from youtube_dl/extractor/funimation.py rename to haruhi_dl/extractor/funimation.py diff --git a/youtube_dl/extractor/funk.py b/haruhi_dl/extractor/funk.py similarity index 100% rename from youtube_dl/extractor/funk.py rename to haruhi_dl/extractor/funk.py diff --git a/youtube_dl/extractor/fusion.py b/haruhi_dl/extractor/fusion.py similarity index 100% rename from youtube_dl/extractor/fusion.py rename to haruhi_dl/extractor/fusion.py diff --git a/youtube_dl/extractor/fxnetworks.py b/haruhi_dl/extractor/fxnetworks.py similarity index 100% rename from youtube_dl/extractor/fxnetworks.py rename to haruhi_dl/extractor/fxnetworks.py diff --git a/youtube_dl/extractor/gaia.py b/haruhi_dl/extractor/gaia.py similarity index 100% rename from youtube_dl/extractor/gaia.py rename to haruhi_dl/extractor/gaia.py diff --git a/youtube_dl/extractor/gameinformer.py b/haruhi_dl/extractor/gameinformer.py similarity index 100% rename from youtube_dl/extractor/gameinformer.py rename to haruhi_dl/extractor/gameinformer.py diff --git a/youtube_dl/extractor/gamespot.py b/haruhi_dl/extractor/gamespot.py similarity index 100% rename from youtube_dl/extractor/gamespot.py rename to haruhi_dl/extractor/gamespot.py diff --git a/youtube_dl/extractor/gamestar.py b/haruhi_dl/extractor/gamestar.py similarity index 100% rename from youtube_dl/extractor/gamestar.py rename to haruhi_dl/extractor/gamestar.py diff --git a/youtube_dl/extractor/gaskrank.py b/haruhi_dl/extractor/gaskrank.py similarity index 100% rename from youtube_dl/extractor/gaskrank.py rename to haruhi_dl/extractor/gaskrank.py diff --git a/youtube_dl/extractor/gazeta.py b/haruhi_dl/extractor/gazeta.py similarity index 100% rename from youtube_dl/extractor/gazeta.py rename to haruhi_dl/extractor/gazeta.py diff --git a/youtube_dl/extractor/gdcvault.py b/haruhi_dl/extractor/gdcvault.py similarity index 100% rename from youtube_dl/extractor/gdcvault.py rename to haruhi_dl/extractor/gdcvault.py diff --git a/youtube_dl/extractor/generic.py b/haruhi_dl/extractor/generic.py similarity index 99% rename from youtube_dl/extractor/generic.py rename to haruhi_dl/extractor/generic.py index 355067a50..a5ab9ee33 100644 --- a/youtube_dl/extractor/generic.py +++ b/haruhi_dl/extractor/generic.py @@ -185,9 +185,9 @@ class GenericIE(InfoExtractor): }, # RSS feed { - 'url': 'http://phihag.de/2014/youtube-dl/rss2.xml', + 'url': 'http://phihag.de/2014/haruhi-dl/rss2.xml', 'info_dict': { - 'id': 'http://phihag.de/2014/youtube-dl/rss2.xml', + 'id': 'http://phihag.de/2014/haruhi-dl/rss2.xml', 'title': 'Zero Punctuation', 'description': 're:.*groundbreaking video review series.*' }, @@ -433,7 +433,7 @@ class GenericIE(InfoExtractor): }, }, { - # https://github.com/ytdl-org/youtube-dl/issues/2253 + # https://github.com/ytdl-org/haruhi-dl/issues/2253 'url': 'http://bcove.me/i6nfkrc3', 'md5': '0ba9446db037002366bab3b3eb30c88c', 'info_dict': { @@ -458,7 +458,7 @@ class GenericIE(InfoExtractor): }, }, { - # https://github.com/ytdl-org/youtube-dl/issues/3541 + # https://github.com/ytdl-org/haruhi-dl/issues/3541 'add_ie': ['BrightcoveLegacy'], 'url': 'http://www.kijk.nl/sbs6/leermijvrouwenkennen/videos/jqMiXKAYan2S/aflevering-1', 'info_dict': { @@ -922,7 +922,7 @@ class GenericIE(InfoExtractor): } }, # Multiple brightcove videos - # https://github.com/ytdl-org/youtube-dl/issues/2283 + # https://github.com/ytdl-org/haruhi-dl/issues/2283 { 'url': 'http://www.newyorker.com/online/blogs/newsdesk/2014/01/always-never-nuclear-command-and-control.html', 'info_dict': { @@ -1947,7 +1947,7 @@ class GenericIE(InfoExtractor): }, { # vshare embed - 'url': 'https://youtube-dl-demo.neocities.org/vshare.html', + 'url': 'https://haruhi-dl-demo.neocities.org/vshare.html', 'md5': '17b39f55b5497ae8b59f5fbce8e35886', 'info_dict': { 'id': '0f64ce6', @@ -2263,7 +2263,7 @@ class GenericIE(InfoExtractor): if default_search == 'auto_warning': if re.match(r'^(?:url|URL)$', url): raise ExtractorError( - 'Invalid URL: %r . Call youtube-dl like this: youtube-dl -v "https://www.youtube.com/watch?v=BaW_jenozKc" ' % url, + 'Invalid URL: %r . Call haruhi-dl like this: haruhi-dl -v "https://www.youtube.com/watch?v=BaW_jenozKc" ' % url, expected=True) else: self._downloader.report_warning( @@ -2273,7 +2273,7 @@ class GenericIE(InfoExtractor): if default_search in ('error', 'fixup_error'): raise ExtractorError( '%r is not a valid URL. ' - 'Set --default-search "ytsearch" (or run youtube-dl "ytsearch:%s" ) to search YouTube' + 'Set --default-search "ytsearch" (or run haruhi-dl "ytsearch:%s" ) to search YouTube' % (url, url), expected=True) else: if ':' not in default_search: @@ -2349,7 +2349,7 @@ class GenericIE(InfoExtractor): request = sanitized_Request(url) # Some webservers may serve compressed content of rather big size (e.g. gzipped flac) # making it impossible to download only chunk of the file (yet we need only 512kB to - # test whether it's HTML or not). According to youtube-dl default Accept-Encoding + # test whether it's HTML or not). According to haruhi-dl default Accept-Encoding # that will always result in downloading the whole file that is not desirable. # Therefore for extraction pass we have to override Accept-Encoding to any in order # to accept raw bytes and being able to download only a chunk. @@ -2421,12 +2421,12 @@ class GenericIE(InfoExtractor): return camtasia_res # Sometimes embedded video player is hidden behind percent encoding - # (e.g. https://github.com/ytdl-org/youtube-dl/issues/2448) + # (e.g. https://github.com/ytdl-org/haruhi-dl/issues/2448) # Unescaping the whole page allows to handle those cases in a generic way webpage = compat_urllib_parse_unquote(webpage) # Unescape squarespace embeds to be detected by generic extractor, - # see https://github.com/ytdl-org/youtube-dl/issues/21294 + # see https://github.com/ytdl-org/haruhi-dl/issues/21294 webpage = re.sub( r'<div[^>]+class=[^>]*?\bsqs-video-wrapper\b[^>]*>', lambda x: unescapeHTML(x.group(0)), webpage) @@ -3239,7 +3239,7 @@ class GenericIE(InfoExtractor): jwplayer_data, video_id, require_title=False, base_url=url) return merge_dicts(info, info_dict) except ExtractorError: - # See https://github.com/ytdl-org/youtube-dl/pull/16735 + # See https://github.com/ytdl-org/haruhi-dl/pull/16735 pass # Video.js embed @@ -3372,7 +3372,7 @@ class GenericIE(InfoExtractor): if not found: # twitter:player is a https URL to iframe player that may or may not - # be supported by youtube-dl thus this is checked the very last (see + # be supported by haruhi-dl thus this is checked the very last (see # https://dev.twitter.com/cards/types/player#On_twitter.com_via_desktop_browser) embed_url = self._html_search_meta('twitter:player', webpage, default=None) if embed_url and embed_url != url: diff --git a/youtube_dl/extractor/gfycat.py b/haruhi_dl/extractor/gfycat.py similarity index 100% rename from youtube_dl/extractor/gfycat.py rename to haruhi_dl/extractor/gfycat.py diff --git a/youtube_dl/extractor/giantbomb.py b/haruhi_dl/extractor/giantbomb.py similarity index 100% rename from youtube_dl/extractor/giantbomb.py rename to haruhi_dl/extractor/giantbomb.py diff --git a/youtube_dl/extractor/giga.py b/haruhi_dl/extractor/giga.py similarity index 100% rename from youtube_dl/extractor/giga.py rename to haruhi_dl/extractor/giga.py diff --git a/youtube_dl/extractor/gigya.py b/haruhi_dl/extractor/gigya.py similarity index 100% rename from youtube_dl/extractor/gigya.py rename to haruhi_dl/extractor/gigya.py diff --git a/youtube_dl/extractor/glide.py b/haruhi_dl/extractor/glide.py similarity index 100% rename from youtube_dl/extractor/glide.py rename to haruhi_dl/extractor/glide.py diff --git a/youtube_dl/extractor/globo.py b/haruhi_dl/extractor/globo.py similarity index 100% rename from youtube_dl/extractor/globo.py rename to haruhi_dl/extractor/globo.py diff --git a/youtube_dl/extractor/go.py b/haruhi_dl/extractor/go.py similarity index 100% rename from youtube_dl/extractor/go.py rename to haruhi_dl/extractor/go.py diff --git a/youtube_dl/extractor/godtube.py b/haruhi_dl/extractor/godtube.py similarity index 100% rename from youtube_dl/extractor/godtube.py rename to haruhi_dl/extractor/godtube.py diff --git a/youtube_dl/extractor/golem.py b/haruhi_dl/extractor/golem.py similarity index 100% rename from youtube_dl/extractor/golem.py rename to haruhi_dl/extractor/golem.py diff --git a/youtube_dl/extractor/googledrive.py b/haruhi_dl/extractor/googledrive.py similarity index 99% rename from youtube_dl/extractor/googledrive.py rename to haruhi_dl/extractor/googledrive.py index f2cc57e44..a3fe0ecff 100644 --- a/youtube_dl/extractor/googledrive.py +++ b/haruhi_dl/extractor/googledrive.py @@ -36,7 +36,7 @@ class GoogleDriveIE(InfoExtractor): } }, { # video can't be watched anonymously due to view count limit reached, - # but can be downloaded (see https://github.com/ytdl-org/youtube-dl/issues/14046) + # but can be downloaded (see https://github.com/ytdl-org/haruhi-dl/issues/14046) 'url': 'https://drive.google.com/file/d/0B-vUyvmDLdWDcEt4WjBqcmI2XzQ/view', 'md5': 'bfbd670d03a470bb1e6d4a257adec12e', 'info_dict': { diff --git a/youtube_dl/extractor/googleplus.py b/haruhi_dl/extractor/googleplus.py similarity index 100% rename from youtube_dl/extractor/googleplus.py rename to haruhi_dl/extractor/googleplus.py diff --git a/youtube_dl/extractor/googlesearch.py b/haruhi_dl/extractor/googlesearch.py similarity index 100% rename from youtube_dl/extractor/googlesearch.py rename to haruhi_dl/extractor/googlesearch.py diff --git a/youtube_dl/extractor/goshgay.py b/haruhi_dl/extractor/goshgay.py similarity index 100% rename from youtube_dl/extractor/goshgay.py rename to haruhi_dl/extractor/goshgay.py diff --git a/youtube_dl/extractor/gputechconf.py b/haruhi_dl/extractor/gputechconf.py similarity index 100% rename from youtube_dl/extractor/gputechconf.py rename to haruhi_dl/extractor/gputechconf.py diff --git a/youtube_dl/extractor/groupon.py b/haruhi_dl/extractor/groupon.py similarity index 100% rename from youtube_dl/extractor/groupon.py rename to haruhi_dl/extractor/groupon.py diff --git a/youtube_dl/extractor/hbo.py b/haruhi_dl/extractor/hbo.py similarity index 100% rename from youtube_dl/extractor/hbo.py rename to haruhi_dl/extractor/hbo.py diff --git a/youtube_dl/extractor/hearthisat.py b/haruhi_dl/extractor/hearthisat.py similarity index 100% rename from youtube_dl/extractor/hearthisat.py rename to haruhi_dl/extractor/hearthisat.py diff --git a/youtube_dl/extractor/heise.py b/haruhi_dl/extractor/heise.py similarity index 100% rename from youtube_dl/extractor/heise.py rename to haruhi_dl/extractor/heise.py diff --git a/youtube_dl/extractor/hellporno.py b/haruhi_dl/extractor/hellporno.py similarity index 100% rename from youtube_dl/extractor/hellporno.py rename to haruhi_dl/extractor/hellporno.py diff --git a/youtube_dl/extractor/helsinki.py b/haruhi_dl/extractor/helsinki.py similarity index 100% rename from youtube_dl/extractor/helsinki.py rename to haruhi_dl/extractor/helsinki.py diff --git a/youtube_dl/extractor/hentaistigma.py b/haruhi_dl/extractor/hentaistigma.py similarity index 100% rename from youtube_dl/extractor/hentaistigma.py rename to haruhi_dl/extractor/hentaistigma.py diff --git a/youtube_dl/extractor/hgtv.py b/haruhi_dl/extractor/hgtv.py similarity index 100% rename from youtube_dl/extractor/hgtv.py rename to haruhi_dl/extractor/hgtv.py diff --git a/youtube_dl/extractor/hidive.py b/haruhi_dl/extractor/hidive.py similarity index 100% rename from youtube_dl/extractor/hidive.py rename to haruhi_dl/extractor/hidive.py diff --git a/youtube_dl/extractor/historicfilms.py b/haruhi_dl/extractor/historicfilms.py similarity index 100% rename from youtube_dl/extractor/historicfilms.py rename to haruhi_dl/extractor/historicfilms.py diff --git a/youtube_dl/extractor/hitbox.py b/haruhi_dl/extractor/hitbox.py similarity index 100% rename from youtube_dl/extractor/hitbox.py rename to haruhi_dl/extractor/hitbox.py diff --git a/youtube_dl/extractor/hitrecord.py b/haruhi_dl/extractor/hitrecord.py similarity index 100% rename from youtube_dl/extractor/hitrecord.py rename to haruhi_dl/extractor/hitrecord.py diff --git a/youtube_dl/extractor/hketv.py b/haruhi_dl/extractor/hketv.py similarity index 100% rename from youtube_dl/extractor/hketv.py rename to haruhi_dl/extractor/hketv.py diff --git a/youtube_dl/extractor/hornbunny.py b/haruhi_dl/extractor/hornbunny.py similarity index 100% rename from youtube_dl/extractor/hornbunny.py rename to haruhi_dl/extractor/hornbunny.py diff --git a/youtube_dl/extractor/hotnewhiphop.py b/haruhi_dl/extractor/hotnewhiphop.py similarity index 100% rename from youtube_dl/extractor/hotnewhiphop.py rename to haruhi_dl/extractor/hotnewhiphop.py diff --git a/youtube_dl/extractor/hotstar.py b/haruhi_dl/extractor/hotstar.py similarity index 100% rename from youtube_dl/extractor/hotstar.py rename to haruhi_dl/extractor/hotstar.py diff --git a/youtube_dl/extractor/howcast.py b/haruhi_dl/extractor/howcast.py similarity index 100% rename from youtube_dl/extractor/howcast.py rename to haruhi_dl/extractor/howcast.py diff --git a/youtube_dl/extractor/howstuffworks.py b/haruhi_dl/extractor/howstuffworks.py similarity index 100% rename from youtube_dl/extractor/howstuffworks.py rename to haruhi_dl/extractor/howstuffworks.py diff --git a/youtube_dl/extractor/hrti.py b/haruhi_dl/extractor/hrti.py similarity index 100% rename from youtube_dl/extractor/hrti.py rename to haruhi_dl/extractor/hrti.py diff --git a/youtube_dl/extractor/huajiao.py b/haruhi_dl/extractor/huajiao.py similarity index 100% rename from youtube_dl/extractor/huajiao.py rename to haruhi_dl/extractor/huajiao.py diff --git a/youtube_dl/extractor/huffpost.py b/haruhi_dl/extractor/huffpost.py similarity index 100% rename from youtube_dl/extractor/huffpost.py rename to haruhi_dl/extractor/huffpost.py diff --git a/youtube_dl/extractor/hungama.py b/haruhi_dl/extractor/hungama.py similarity index 100% rename from youtube_dl/extractor/hungama.py rename to haruhi_dl/extractor/hungama.py diff --git a/youtube_dl/extractor/hypem.py b/haruhi_dl/extractor/hypem.py similarity index 100% rename from youtube_dl/extractor/hypem.py rename to haruhi_dl/extractor/hypem.py diff --git a/youtube_dl/extractor/ign.py b/haruhi_dl/extractor/ign.py similarity index 100% rename from youtube_dl/extractor/ign.py rename to haruhi_dl/extractor/ign.py diff --git a/youtube_dl/extractor/imdb.py b/haruhi_dl/extractor/imdb.py similarity index 100% rename from youtube_dl/extractor/imdb.py rename to haruhi_dl/extractor/imdb.py diff --git a/youtube_dl/extractor/imggaming.py b/haruhi_dl/extractor/imggaming.py similarity index 100% rename from youtube_dl/extractor/imggaming.py rename to haruhi_dl/extractor/imggaming.py diff --git a/youtube_dl/extractor/imgur.py b/haruhi_dl/extractor/imgur.py similarity index 97% rename from youtube_dl/extractor/imgur.py rename to haruhi_dl/extractor/imgur.py index a5ba03efa..6c8cc2639 100644 --- a/youtube_dl/extractor/imgur.py +++ b/haruhi_dl/extractor/imgur.py @@ -60,7 +60,7 @@ class ImgurIE(InfoExtractor): 'width': width, 'height': height, 'http_headers': { - 'User-Agent': 'youtube-dl (like wget)', + 'User-Agent': 'haruhi-dl (like wget)', }, }) @@ -82,7 +82,7 @@ class ImgurIE(InfoExtractor): 'url': self._proto_relative_url(gifd['gifUrl']), 'filesize': gifd.get('size'), 'http_headers': { - 'User-Agent': 'youtube-dl (like wget)', + 'User-Agent': 'haruhi-dl (like wget)', }, }) diff --git a/youtube_dl/extractor/ina.py b/haruhi_dl/extractor/ina.py similarity index 100% rename from youtube_dl/extractor/ina.py rename to haruhi_dl/extractor/ina.py diff --git a/youtube_dl/extractor/inc.py b/haruhi_dl/extractor/inc.py similarity index 100% rename from youtube_dl/extractor/inc.py rename to haruhi_dl/extractor/inc.py diff --git a/youtube_dl/extractor/indavideo.py b/haruhi_dl/extractor/indavideo.py similarity index 100% rename from youtube_dl/extractor/indavideo.py rename to haruhi_dl/extractor/indavideo.py diff --git a/youtube_dl/extractor/infoq.py b/haruhi_dl/extractor/infoq.py similarity index 100% rename from youtube_dl/extractor/infoq.py rename to haruhi_dl/extractor/infoq.py diff --git a/youtube_dl/extractor/instagram.py b/haruhi_dl/extractor/instagram.py similarity index 100% rename from youtube_dl/extractor/instagram.py rename to haruhi_dl/extractor/instagram.py diff --git a/youtube_dl/extractor/internazionale.py b/haruhi_dl/extractor/internazionale.py similarity index 100% rename from youtube_dl/extractor/internazionale.py rename to haruhi_dl/extractor/internazionale.py diff --git a/youtube_dl/extractor/internetvideoarchive.py b/haruhi_dl/extractor/internetvideoarchive.py similarity index 100% rename from youtube_dl/extractor/internetvideoarchive.py rename to haruhi_dl/extractor/internetvideoarchive.py diff --git a/youtube_dl/extractor/iprima.py b/haruhi_dl/extractor/iprima.py similarity index 100% rename from youtube_dl/extractor/iprima.py rename to haruhi_dl/extractor/iprima.py diff --git a/youtube_dl/extractor/iqiyi.py b/haruhi_dl/extractor/iqiyi.py similarity index 100% rename from youtube_dl/extractor/iqiyi.py rename to haruhi_dl/extractor/iqiyi.py diff --git a/youtube_dl/extractor/ir90tv.py b/haruhi_dl/extractor/ir90tv.py similarity index 100% rename from youtube_dl/extractor/ir90tv.py rename to haruhi_dl/extractor/ir90tv.py diff --git a/youtube_dl/extractor/itv.py b/haruhi_dl/extractor/itv.py similarity index 100% rename from youtube_dl/extractor/itv.py rename to haruhi_dl/extractor/itv.py diff --git a/youtube_dl/extractor/ivi.py b/haruhi_dl/extractor/ivi.py similarity index 99% rename from youtube_dl/extractor/ivi.py rename to haruhi_dl/extractor/ivi.py index b5a740a01..7b4af8d4d 100644 --- a/youtube_dl/extractor/ivi.py +++ b/haruhi_dl/extractor/ivi.py @@ -142,7 +142,7 @@ class IviIE(InfoExtractor): continue elif bundled: raise ExtractorError( - 'This feature does not work from bundled exe. Run youtube-dl from sources.', + 'This feature does not work from bundled exe. Run haruhi-dl from sources.', expected=True) elif not pycryptodomex_found: raise ExtractorError( diff --git a/youtube_dl/extractor/ivideon.py b/haruhi_dl/extractor/ivideon.py similarity index 100% rename from youtube_dl/extractor/ivideon.py rename to haruhi_dl/extractor/ivideon.py diff --git a/youtube_dl/extractor/iwara.py b/haruhi_dl/extractor/iwara.py similarity index 100% rename from youtube_dl/extractor/iwara.py rename to haruhi_dl/extractor/iwara.py diff --git a/youtube_dl/extractor/izlesene.py b/haruhi_dl/extractor/izlesene.py similarity index 100% rename from youtube_dl/extractor/izlesene.py rename to haruhi_dl/extractor/izlesene.py diff --git a/youtube_dl/extractor/jamendo.py b/haruhi_dl/extractor/jamendo.py similarity index 100% rename from youtube_dl/extractor/jamendo.py rename to haruhi_dl/extractor/jamendo.py diff --git a/youtube_dl/extractor/jeuxvideo.py b/haruhi_dl/extractor/jeuxvideo.py similarity index 100% rename from youtube_dl/extractor/jeuxvideo.py rename to haruhi_dl/extractor/jeuxvideo.py diff --git a/youtube_dl/extractor/joj.py b/haruhi_dl/extractor/joj.py similarity index 100% rename from youtube_dl/extractor/joj.py rename to haruhi_dl/extractor/joj.py diff --git a/youtube_dl/extractor/jove.py b/haruhi_dl/extractor/jove.py similarity index 100% rename from youtube_dl/extractor/jove.py rename to haruhi_dl/extractor/jove.py diff --git a/youtube_dl/extractor/jwplatform.py b/haruhi_dl/extractor/jwplatform.py similarity index 100% rename from youtube_dl/extractor/jwplatform.py rename to haruhi_dl/extractor/jwplatform.py diff --git a/youtube_dl/extractor/kakao.py b/haruhi_dl/extractor/kakao.py similarity index 100% rename from youtube_dl/extractor/kakao.py rename to haruhi_dl/extractor/kakao.py diff --git a/youtube_dl/extractor/kaltura.py b/haruhi_dl/extractor/kaltura.py similarity index 100% rename from youtube_dl/extractor/kaltura.py rename to haruhi_dl/extractor/kaltura.py diff --git a/youtube_dl/extractor/kanalplay.py b/haruhi_dl/extractor/kanalplay.py similarity index 100% rename from youtube_dl/extractor/kanalplay.py rename to haruhi_dl/extractor/kanalplay.py diff --git a/youtube_dl/extractor/kankan.py b/haruhi_dl/extractor/kankan.py similarity index 100% rename from youtube_dl/extractor/kankan.py rename to haruhi_dl/extractor/kankan.py diff --git a/youtube_dl/extractor/karaoketv.py b/haruhi_dl/extractor/karaoketv.py similarity index 100% rename from youtube_dl/extractor/karaoketv.py rename to haruhi_dl/extractor/karaoketv.py diff --git a/youtube_dl/extractor/karrierevideos.py b/haruhi_dl/extractor/karrierevideos.py similarity index 100% rename from youtube_dl/extractor/karrierevideos.py rename to haruhi_dl/extractor/karrierevideos.py diff --git a/youtube_dl/extractor/keezmovies.py b/haruhi_dl/extractor/keezmovies.py similarity index 100% rename from youtube_dl/extractor/keezmovies.py rename to haruhi_dl/extractor/keezmovies.py diff --git a/youtube_dl/extractor/ketnet.py b/haruhi_dl/extractor/ketnet.py similarity index 100% rename from youtube_dl/extractor/ketnet.py rename to haruhi_dl/extractor/ketnet.py diff --git a/youtube_dl/extractor/khanacademy.py b/haruhi_dl/extractor/khanacademy.py similarity index 100% rename from youtube_dl/extractor/khanacademy.py rename to haruhi_dl/extractor/khanacademy.py diff --git a/youtube_dl/extractor/kickstarter.py b/haruhi_dl/extractor/kickstarter.py similarity index 100% rename from youtube_dl/extractor/kickstarter.py rename to haruhi_dl/extractor/kickstarter.py diff --git a/youtube_dl/extractor/kinja.py b/haruhi_dl/extractor/kinja.py similarity index 100% rename from youtube_dl/extractor/kinja.py rename to haruhi_dl/extractor/kinja.py diff --git a/youtube_dl/extractor/kinopoisk.py b/haruhi_dl/extractor/kinopoisk.py similarity index 100% rename from youtube_dl/extractor/kinopoisk.py rename to haruhi_dl/extractor/kinopoisk.py diff --git a/youtube_dl/extractor/konserthusetplay.py b/haruhi_dl/extractor/konserthusetplay.py similarity index 100% rename from youtube_dl/extractor/konserthusetplay.py rename to haruhi_dl/extractor/konserthusetplay.py diff --git a/youtube_dl/extractor/krasview.py b/haruhi_dl/extractor/krasview.py similarity index 100% rename from youtube_dl/extractor/krasview.py rename to haruhi_dl/extractor/krasview.py diff --git a/youtube_dl/extractor/ku6.py b/haruhi_dl/extractor/ku6.py similarity index 100% rename from youtube_dl/extractor/ku6.py rename to haruhi_dl/extractor/ku6.py diff --git a/youtube_dl/extractor/kusi.py b/haruhi_dl/extractor/kusi.py similarity index 100% rename from youtube_dl/extractor/kusi.py rename to haruhi_dl/extractor/kusi.py diff --git a/youtube_dl/extractor/kuwo.py b/haruhi_dl/extractor/kuwo.py similarity index 99% rename from youtube_dl/extractor/kuwo.py rename to haruhi_dl/extractor/kuwo.py index cc5b2a1c1..ae70be1ae 100644 --- a/youtube_dl/extractor/kuwo.py +++ b/haruhi_dl/extractor/kuwo.py @@ -215,7 +215,7 @@ class KuwoSingerIE(InfoExtractor): 'title': 'Ali', }, 'playlist_mincount': 95, - 'skip': 'Regularly stalls travis build', # See https://travis-ci.org/ytdl-org/youtube-dl/jobs/78878540 + 'skip': 'Regularly stalls travis build', # See https://travis-ci.org/ytdl-org/haruhi-dl/jobs/78878540 }] PAGE_SIZE = 15 diff --git a/youtube_dl/extractor/la7.py b/haruhi_dl/extractor/la7.py similarity index 100% rename from youtube_dl/extractor/la7.py rename to haruhi_dl/extractor/la7.py diff --git a/youtube_dl/extractor/laola1tv.py b/haruhi_dl/extractor/laola1tv.py similarity index 100% rename from youtube_dl/extractor/laola1tv.py rename to haruhi_dl/extractor/laola1tv.py diff --git a/youtube_dl/extractor/lci.py b/haruhi_dl/extractor/lci.py similarity index 100% rename from youtube_dl/extractor/lci.py rename to haruhi_dl/extractor/lci.py diff --git a/youtube_dl/extractor/lcp.py b/haruhi_dl/extractor/lcp.py similarity index 100% rename from youtube_dl/extractor/lcp.py rename to haruhi_dl/extractor/lcp.py diff --git a/youtube_dl/extractor/lecture2go.py b/haruhi_dl/extractor/lecture2go.py similarity index 100% rename from youtube_dl/extractor/lecture2go.py rename to haruhi_dl/extractor/lecture2go.py diff --git a/youtube_dl/extractor/lecturio.py b/haruhi_dl/extractor/lecturio.py similarity index 100% rename from youtube_dl/extractor/lecturio.py rename to haruhi_dl/extractor/lecturio.py diff --git a/youtube_dl/extractor/leeco.py b/haruhi_dl/extractor/leeco.py similarity index 100% rename from youtube_dl/extractor/leeco.py rename to haruhi_dl/extractor/leeco.py diff --git a/youtube_dl/extractor/lego.py b/haruhi_dl/extractor/lego.py similarity index 100% rename from youtube_dl/extractor/lego.py rename to haruhi_dl/extractor/lego.py diff --git a/youtube_dl/extractor/lemonde.py b/haruhi_dl/extractor/lemonde.py similarity index 100% rename from youtube_dl/extractor/lemonde.py rename to haruhi_dl/extractor/lemonde.py diff --git a/youtube_dl/extractor/lenta.py b/haruhi_dl/extractor/lenta.py similarity index 100% rename from youtube_dl/extractor/lenta.py rename to haruhi_dl/extractor/lenta.py diff --git a/youtube_dl/extractor/libraryofcongress.py b/haruhi_dl/extractor/libraryofcongress.py similarity index 100% rename from youtube_dl/extractor/libraryofcongress.py rename to haruhi_dl/extractor/libraryofcongress.py diff --git a/youtube_dl/extractor/libsyn.py b/haruhi_dl/extractor/libsyn.py similarity index 100% rename from youtube_dl/extractor/libsyn.py rename to haruhi_dl/extractor/libsyn.py diff --git a/youtube_dl/extractor/lifenews.py b/haruhi_dl/extractor/lifenews.py similarity index 100% rename from youtube_dl/extractor/lifenews.py rename to haruhi_dl/extractor/lifenews.py diff --git a/youtube_dl/extractor/limelight.py b/haruhi_dl/extractor/limelight.py similarity index 100% rename from youtube_dl/extractor/limelight.py rename to haruhi_dl/extractor/limelight.py diff --git a/youtube_dl/extractor/line.py b/haruhi_dl/extractor/line.py similarity index 100% rename from youtube_dl/extractor/line.py rename to haruhi_dl/extractor/line.py diff --git a/youtube_dl/extractor/linkedin.py b/haruhi_dl/extractor/linkedin.py similarity index 100% rename from youtube_dl/extractor/linkedin.py rename to haruhi_dl/extractor/linkedin.py diff --git a/youtube_dl/extractor/linuxacademy.py b/haruhi_dl/extractor/linuxacademy.py similarity index 100% rename from youtube_dl/extractor/linuxacademy.py rename to haruhi_dl/extractor/linuxacademy.py diff --git a/youtube_dl/extractor/litv.py b/haruhi_dl/extractor/litv.py similarity index 100% rename from youtube_dl/extractor/litv.py rename to haruhi_dl/extractor/litv.py diff --git a/youtube_dl/extractor/livejournal.py b/haruhi_dl/extractor/livejournal.py similarity index 100% rename from youtube_dl/extractor/livejournal.py rename to haruhi_dl/extractor/livejournal.py diff --git a/youtube_dl/extractor/liveleak.py b/haruhi_dl/extractor/liveleak.py similarity index 97% rename from youtube_dl/extractor/liveleak.py rename to haruhi_dl/extractor/liveleak.py index 4ac437c8b..48f8a8c2e 100644 --- a/youtube_dl/extractor/liveleak.py +++ b/haruhi_dl/extractor/liveleak.py @@ -44,7 +44,7 @@ class LiveLeakIE(InfoExtractor): }, 'skip': 'Video is dead', }, { - # Covers https://github.com/ytdl-org/youtube-dl/pull/5983 + # Covers https://github.com/ytdl-org/haruhi-dl/pull/5983 # Multiple resolutions 'url': 'http://www.liveleak.com/view?i=801_1409392012', 'md5': 'c3a449dbaca5c0d1825caecd52a57d7b', @@ -57,7 +57,7 @@ class LiveLeakIE(InfoExtractor): 'thumbnail': r're:^https?://.*\.jpg$' } }, { - # Covers https://github.com/ytdl-org/youtube-dl/pull/10664#issuecomment-247439521 + # Covers https://github.com/ytdl-org/haruhi-dl/pull/10664#issuecomment-247439521 'url': 'http://m.liveleak.com/view?i=763_1473349649', 'add_ie': ['Youtube'], 'info_dict': { @@ -134,7 +134,7 @@ class LiveLeakIE(InfoExtractor): # Removing '.*.mp4' gives the raw video, which is essentially # the same video without the LiveLeak logo at the top (see - # https://github.com/ytdl-org/youtube-dl/pull/4768) + # https://github.com/ytdl-org/haruhi-dl/pull/4768) orig_url = re.sub(r'\.mp4\.[^.]+', '', a_format['url']) if a_format['url'] != orig_url: format_id = a_format.get('format_id') diff --git a/youtube_dl/extractor/livestream.py b/haruhi_dl/extractor/livestream.py similarity index 100% rename from youtube_dl/extractor/livestream.py rename to haruhi_dl/extractor/livestream.py diff --git a/youtube_dl/extractor/lnkgo.py b/haruhi_dl/extractor/lnkgo.py similarity index 100% rename from youtube_dl/extractor/lnkgo.py rename to haruhi_dl/extractor/lnkgo.py diff --git a/youtube_dl/extractor/localnews8.py b/haruhi_dl/extractor/localnews8.py similarity index 100% rename from youtube_dl/extractor/localnews8.py rename to haruhi_dl/extractor/localnews8.py diff --git a/youtube_dl/extractor/lovehomeporn.py b/haruhi_dl/extractor/lovehomeporn.py similarity index 100% rename from youtube_dl/extractor/lovehomeporn.py rename to haruhi_dl/extractor/lovehomeporn.py diff --git a/youtube_dl/extractor/lrt.py b/haruhi_dl/extractor/lrt.py similarity index 100% rename from youtube_dl/extractor/lrt.py rename to haruhi_dl/extractor/lrt.py diff --git a/youtube_dl/extractor/lynda.py b/haruhi_dl/extractor/lynda.py similarity index 100% rename from youtube_dl/extractor/lynda.py rename to haruhi_dl/extractor/lynda.py diff --git a/youtube_dl/extractor/m6.py b/haruhi_dl/extractor/m6.py similarity index 100% rename from youtube_dl/extractor/m6.py rename to haruhi_dl/extractor/m6.py diff --git a/youtube_dl/extractor/mailru.py b/haruhi_dl/extractor/mailru.py similarity index 100% rename from youtube_dl/extractor/mailru.py rename to haruhi_dl/extractor/mailru.py diff --git a/youtube_dl/extractor/malltv.py b/haruhi_dl/extractor/malltv.py similarity index 100% rename from youtube_dl/extractor/malltv.py rename to haruhi_dl/extractor/malltv.py diff --git a/youtube_dl/extractor/mangomolo.py b/haruhi_dl/extractor/mangomolo.py similarity index 100% rename from youtube_dl/extractor/mangomolo.py rename to haruhi_dl/extractor/mangomolo.py diff --git a/youtube_dl/extractor/manyvids.py b/haruhi_dl/extractor/manyvids.py similarity index 100% rename from youtube_dl/extractor/manyvids.py rename to haruhi_dl/extractor/manyvids.py diff --git a/youtube_dl/extractor/markiza.py b/haruhi_dl/extractor/markiza.py similarity index 100% rename from youtube_dl/extractor/markiza.py rename to haruhi_dl/extractor/markiza.py diff --git a/youtube_dl/extractor/massengeschmacktv.py b/haruhi_dl/extractor/massengeschmacktv.py similarity index 100% rename from youtube_dl/extractor/massengeschmacktv.py rename to haruhi_dl/extractor/massengeschmacktv.py diff --git a/youtube_dl/extractor/matchtv.py b/haruhi_dl/extractor/matchtv.py similarity index 100% rename from youtube_dl/extractor/matchtv.py rename to haruhi_dl/extractor/matchtv.py diff --git a/youtube_dl/extractor/mdr.py b/haruhi_dl/extractor/mdr.py similarity index 100% rename from youtube_dl/extractor/mdr.py rename to haruhi_dl/extractor/mdr.py diff --git a/youtube_dl/extractor/medialaan.py b/haruhi_dl/extractor/medialaan.py similarity index 100% rename from youtube_dl/extractor/medialaan.py rename to haruhi_dl/extractor/medialaan.py diff --git a/youtube_dl/extractor/mediaset.py b/haruhi_dl/extractor/mediaset.py similarity index 100% rename from youtube_dl/extractor/mediaset.py rename to haruhi_dl/extractor/mediaset.py diff --git a/youtube_dl/extractor/mediasite.py b/haruhi_dl/extractor/mediasite.py similarity index 100% rename from youtube_dl/extractor/mediasite.py rename to haruhi_dl/extractor/mediasite.py diff --git a/youtube_dl/extractor/medici.py b/haruhi_dl/extractor/medici.py similarity index 100% rename from youtube_dl/extractor/medici.py rename to haruhi_dl/extractor/medici.py diff --git a/youtube_dl/extractor/megaphone.py b/haruhi_dl/extractor/megaphone.py similarity index 100% rename from youtube_dl/extractor/megaphone.py rename to haruhi_dl/extractor/megaphone.py diff --git a/youtube_dl/extractor/meipai.py b/haruhi_dl/extractor/meipai.py similarity index 100% rename from youtube_dl/extractor/meipai.py rename to haruhi_dl/extractor/meipai.py diff --git a/youtube_dl/extractor/melonvod.py b/haruhi_dl/extractor/melonvod.py similarity index 100% rename from youtube_dl/extractor/melonvod.py rename to haruhi_dl/extractor/melonvod.py diff --git a/youtube_dl/extractor/meta.py b/haruhi_dl/extractor/meta.py similarity index 100% rename from youtube_dl/extractor/meta.py rename to haruhi_dl/extractor/meta.py diff --git a/youtube_dl/extractor/metacafe.py b/haruhi_dl/extractor/metacafe.py similarity index 100% rename from youtube_dl/extractor/metacafe.py rename to haruhi_dl/extractor/metacafe.py diff --git a/youtube_dl/extractor/metacritic.py b/haruhi_dl/extractor/metacritic.py similarity index 100% rename from youtube_dl/extractor/metacritic.py rename to haruhi_dl/extractor/metacritic.py diff --git a/youtube_dl/extractor/mgoon.py b/haruhi_dl/extractor/mgoon.py similarity index 100% rename from youtube_dl/extractor/mgoon.py rename to haruhi_dl/extractor/mgoon.py diff --git a/youtube_dl/extractor/mgtv.py b/haruhi_dl/extractor/mgtv.py similarity index 100% rename from youtube_dl/extractor/mgtv.py rename to haruhi_dl/extractor/mgtv.py diff --git a/youtube_dl/extractor/miaopai.py b/haruhi_dl/extractor/miaopai.py similarity index 100% rename from youtube_dl/extractor/miaopai.py rename to haruhi_dl/extractor/miaopai.py diff --git a/youtube_dl/extractor/microsoftvirtualacademy.py b/haruhi_dl/extractor/microsoftvirtualacademy.py similarity index 100% rename from youtube_dl/extractor/microsoftvirtualacademy.py rename to haruhi_dl/extractor/microsoftvirtualacademy.py diff --git a/youtube_dl/extractor/ministrygrid.py b/haruhi_dl/extractor/ministrygrid.py similarity index 100% rename from youtube_dl/extractor/ministrygrid.py rename to haruhi_dl/extractor/ministrygrid.py diff --git a/youtube_dl/extractor/minoto.py b/haruhi_dl/extractor/minoto.py similarity index 100% rename from youtube_dl/extractor/minoto.py rename to haruhi_dl/extractor/minoto.py diff --git a/youtube_dl/extractor/miomio.py b/haruhi_dl/extractor/miomio.py similarity index 100% rename from youtube_dl/extractor/miomio.py rename to haruhi_dl/extractor/miomio.py diff --git a/youtube_dl/extractor/mit.py b/haruhi_dl/extractor/mit.py similarity index 100% rename from youtube_dl/extractor/mit.py rename to haruhi_dl/extractor/mit.py diff --git a/youtube_dl/extractor/mitele.py b/haruhi_dl/extractor/mitele.py similarity index 100% rename from youtube_dl/extractor/mitele.py rename to haruhi_dl/extractor/mitele.py diff --git a/youtube_dl/extractor/mixcloud.py b/haruhi_dl/extractor/mixcloud.py similarity index 100% rename from youtube_dl/extractor/mixcloud.py rename to haruhi_dl/extractor/mixcloud.py diff --git a/youtube_dl/extractor/mlb.py b/haruhi_dl/extractor/mlb.py similarity index 100% rename from youtube_dl/extractor/mlb.py rename to haruhi_dl/extractor/mlb.py diff --git a/youtube_dl/extractor/mnet.py b/haruhi_dl/extractor/mnet.py similarity index 100% rename from youtube_dl/extractor/mnet.py rename to haruhi_dl/extractor/mnet.py diff --git a/youtube_dl/extractor/moevideo.py b/haruhi_dl/extractor/moevideo.py similarity index 100% rename from youtube_dl/extractor/moevideo.py rename to haruhi_dl/extractor/moevideo.py diff --git a/youtube_dl/extractor/mofosex.py b/haruhi_dl/extractor/mofosex.py similarity index 100% rename from youtube_dl/extractor/mofosex.py rename to haruhi_dl/extractor/mofosex.py diff --git a/youtube_dl/extractor/mojvideo.py b/haruhi_dl/extractor/mojvideo.py similarity index 100% rename from youtube_dl/extractor/mojvideo.py rename to haruhi_dl/extractor/mojvideo.py diff --git a/youtube_dl/extractor/morningstar.py b/haruhi_dl/extractor/morningstar.py similarity index 100% rename from youtube_dl/extractor/morningstar.py rename to haruhi_dl/extractor/morningstar.py diff --git a/youtube_dl/extractor/motherless.py b/haruhi_dl/extractor/motherless.py similarity index 100% rename from youtube_dl/extractor/motherless.py rename to haruhi_dl/extractor/motherless.py diff --git a/youtube_dl/extractor/motorsport.py b/haruhi_dl/extractor/motorsport.py similarity index 100% rename from youtube_dl/extractor/motorsport.py rename to haruhi_dl/extractor/motorsport.py diff --git a/youtube_dl/extractor/movieclips.py b/haruhi_dl/extractor/movieclips.py similarity index 100% rename from youtube_dl/extractor/movieclips.py rename to haruhi_dl/extractor/movieclips.py diff --git a/youtube_dl/extractor/moviezine.py b/haruhi_dl/extractor/moviezine.py similarity index 100% rename from youtube_dl/extractor/moviezine.py rename to haruhi_dl/extractor/moviezine.py diff --git a/youtube_dl/extractor/movingimage.py b/haruhi_dl/extractor/movingimage.py similarity index 100% rename from youtube_dl/extractor/movingimage.py rename to haruhi_dl/extractor/movingimage.py diff --git a/youtube_dl/extractor/msn.py b/haruhi_dl/extractor/msn.py similarity index 98% rename from youtube_dl/extractor/msn.py rename to haruhi_dl/extractor/msn.py index e59b0b7b0..53a12946a 100644 --- a/youtube_dl/extractor/msn.py +++ b/haruhi_dl/extractor/msn.py @@ -111,7 +111,7 @@ class MSNIE(InfoExtractor): continue if 'format=m3u8-aapl' in format_url: # m3u8_native should not be used here until - # https://github.com/ytdl-org/youtube-dl/issues/9913 is fixed + # https://github.com/ytdl-org/haruhi-dl/issues/9913 is fixed formats.extend(self._extract_m3u8_formats( format_url, display_id, 'mp4', m3u8_id='hls', fatal=False)) diff --git a/youtube_dl/extractor/mtv.py b/haruhi_dl/extractor/mtv.py similarity index 100% rename from youtube_dl/extractor/mtv.py rename to haruhi_dl/extractor/mtv.py diff --git a/youtube_dl/extractor/muenchentv.py b/haruhi_dl/extractor/muenchentv.py similarity index 100% rename from youtube_dl/extractor/muenchentv.py rename to haruhi_dl/extractor/muenchentv.py diff --git a/youtube_dl/extractor/mwave.py b/haruhi_dl/extractor/mwave.py similarity index 100% rename from youtube_dl/extractor/mwave.py rename to haruhi_dl/extractor/mwave.py diff --git a/youtube_dl/extractor/mychannels.py b/haruhi_dl/extractor/mychannels.py similarity index 100% rename from youtube_dl/extractor/mychannels.py rename to haruhi_dl/extractor/mychannels.py diff --git a/youtube_dl/extractor/myspace.py b/haruhi_dl/extractor/myspace.py similarity index 100% rename from youtube_dl/extractor/myspace.py rename to haruhi_dl/extractor/myspace.py diff --git a/youtube_dl/extractor/myspass.py b/haruhi_dl/extractor/myspass.py similarity index 100% rename from youtube_dl/extractor/myspass.py rename to haruhi_dl/extractor/myspass.py diff --git a/youtube_dl/extractor/myvi.py b/haruhi_dl/extractor/myvi.py similarity index 100% rename from youtube_dl/extractor/myvi.py rename to haruhi_dl/extractor/myvi.py diff --git a/youtube_dl/extractor/myvidster.py b/haruhi_dl/extractor/myvidster.py similarity index 100% rename from youtube_dl/extractor/myvidster.py rename to haruhi_dl/extractor/myvidster.py diff --git a/youtube_dl/extractor/nationalgeographic.py b/haruhi_dl/extractor/nationalgeographic.py similarity index 100% rename from youtube_dl/extractor/nationalgeographic.py rename to haruhi_dl/extractor/nationalgeographic.py diff --git a/youtube_dl/extractor/naver.py b/haruhi_dl/extractor/naver.py similarity index 100% rename from youtube_dl/extractor/naver.py rename to haruhi_dl/extractor/naver.py diff --git a/youtube_dl/extractor/nba.py b/haruhi_dl/extractor/nba.py similarity index 100% rename from youtube_dl/extractor/nba.py rename to haruhi_dl/extractor/nba.py diff --git a/youtube_dl/extractor/nbc.py b/haruhi_dl/extractor/nbc.py similarity index 100% rename from youtube_dl/extractor/nbc.py rename to haruhi_dl/extractor/nbc.py diff --git a/youtube_dl/extractor/ndr.py b/haruhi_dl/extractor/ndr.py similarity index 100% rename from youtube_dl/extractor/ndr.py rename to haruhi_dl/extractor/ndr.py diff --git a/youtube_dl/extractor/ndtv.py b/haruhi_dl/extractor/ndtv.py similarity index 100% rename from youtube_dl/extractor/ndtv.py rename to haruhi_dl/extractor/ndtv.py diff --git a/youtube_dl/extractor/nerdcubed.py b/haruhi_dl/extractor/nerdcubed.py similarity index 100% rename from youtube_dl/extractor/nerdcubed.py rename to haruhi_dl/extractor/nerdcubed.py diff --git a/youtube_dl/extractor/neteasemusic.py b/haruhi_dl/extractor/neteasemusic.py similarity index 100% rename from youtube_dl/extractor/neteasemusic.py rename to haruhi_dl/extractor/neteasemusic.py diff --git a/youtube_dl/extractor/netzkino.py b/haruhi_dl/extractor/netzkino.py similarity index 100% rename from youtube_dl/extractor/netzkino.py rename to haruhi_dl/extractor/netzkino.py diff --git a/youtube_dl/extractor/newgrounds.py b/haruhi_dl/extractor/newgrounds.py similarity index 100% rename from youtube_dl/extractor/newgrounds.py rename to haruhi_dl/extractor/newgrounds.py diff --git a/youtube_dl/extractor/newstube.py b/haruhi_dl/extractor/newstube.py similarity index 100% rename from youtube_dl/extractor/newstube.py rename to haruhi_dl/extractor/newstube.py diff --git a/youtube_dl/extractor/nextmedia.py b/haruhi_dl/extractor/nextmedia.py similarity index 100% rename from youtube_dl/extractor/nextmedia.py rename to haruhi_dl/extractor/nextmedia.py diff --git a/youtube_dl/extractor/nexx.py b/haruhi_dl/extractor/nexx.py similarity index 100% rename from youtube_dl/extractor/nexx.py rename to haruhi_dl/extractor/nexx.py diff --git a/youtube_dl/extractor/nfl.py b/haruhi_dl/extractor/nfl.py similarity index 100% rename from youtube_dl/extractor/nfl.py rename to haruhi_dl/extractor/nfl.py diff --git a/youtube_dl/extractor/nhk.py b/haruhi_dl/extractor/nhk.py similarity index 100% rename from youtube_dl/extractor/nhk.py rename to haruhi_dl/extractor/nhk.py diff --git a/youtube_dl/extractor/nhl.py b/haruhi_dl/extractor/nhl.py similarity index 99% rename from youtube_dl/extractor/nhl.py rename to haruhi_dl/extractor/nhl.py index eddfe1f37..1a6e0da91 100644 --- a/youtube_dl/extractor/nhl.py +++ b/haruhi_dl/extractor/nhl.py @@ -108,7 +108,7 @@ class NHLIE(NHLBaseIE): 'timestamp': 1454544904, }, }, { - # Some m3u8 URLs are invalid (https://github.com/ytdl-org/youtube-dl/issues/10713) + # Some m3u8 URLs are invalid (https://github.com/ytdl-org/haruhi-dl/issues/10713) 'url': 'https://www.nhl.com/predators/video/poile-laviolette-on-subban-trade/t-277437416/c-44315003', 'md5': '50b2bb47f405121484dda3ccbea25459', 'info_dict': { diff --git a/youtube_dl/extractor/nick.py b/haruhi_dl/extractor/nick.py similarity index 100% rename from youtube_dl/extractor/nick.py rename to haruhi_dl/extractor/nick.py diff --git a/youtube_dl/extractor/niconico.py b/haruhi_dl/extractor/niconico.py similarity index 100% rename from youtube_dl/extractor/niconico.py rename to haruhi_dl/extractor/niconico.py diff --git a/youtube_dl/extractor/ninecninemedia.py b/haruhi_dl/extractor/ninecninemedia.py similarity index 100% rename from youtube_dl/extractor/ninecninemedia.py rename to haruhi_dl/extractor/ninecninemedia.py diff --git a/youtube_dl/extractor/ninegag.py b/haruhi_dl/extractor/ninegag.py similarity index 100% rename from youtube_dl/extractor/ninegag.py rename to haruhi_dl/extractor/ninegag.py diff --git a/youtube_dl/extractor/ninenow.py b/haruhi_dl/extractor/ninenow.py similarity index 100% rename from youtube_dl/extractor/ninenow.py rename to haruhi_dl/extractor/ninenow.py diff --git a/youtube_dl/extractor/nintendo.py b/haruhi_dl/extractor/nintendo.py similarity index 100% rename from youtube_dl/extractor/nintendo.py rename to haruhi_dl/extractor/nintendo.py diff --git a/youtube_dl/extractor/njpwworld.py b/haruhi_dl/extractor/njpwworld.py similarity index 100% rename from youtube_dl/extractor/njpwworld.py rename to haruhi_dl/extractor/njpwworld.py diff --git a/youtube_dl/extractor/nobelprize.py b/haruhi_dl/extractor/nobelprize.py similarity index 100% rename from youtube_dl/extractor/nobelprize.py rename to haruhi_dl/extractor/nobelprize.py diff --git a/youtube_dl/extractor/noco.py b/haruhi_dl/extractor/noco.py similarity index 98% rename from youtube_dl/extractor/noco.py rename to haruhi_dl/extractor/noco.py index 30df905af..66e264e11 100644 --- a/youtube_dl/extractor/noco.py +++ b/haruhi_dl/extractor/noco.py @@ -115,7 +115,7 @@ class NocoIE(InfoExtractor): # Timestamp adjustment offset between server time and local time # must be calculated in order to use timestamps closest to server's - # in all API requests (see https://github.com/ytdl-org/youtube-dl/issues/7864) + # in all API requests (see https://github.com/ytdl-org/haruhi-dl/issues/7864) webpage = self._download_webpage(url, video_id) player_url = self._search_regex( diff --git a/youtube_dl/extractor/nonktube.py b/haruhi_dl/extractor/nonktube.py similarity index 100% rename from youtube_dl/extractor/nonktube.py rename to haruhi_dl/extractor/nonktube.py diff --git a/youtube_dl/extractor/noovo.py b/haruhi_dl/extractor/noovo.py similarity index 100% rename from youtube_dl/extractor/noovo.py rename to haruhi_dl/extractor/noovo.py diff --git a/youtube_dl/extractor/normalboots.py b/haruhi_dl/extractor/normalboots.py similarity index 100% rename from youtube_dl/extractor/normalboots.py rename to haruhi_dl/extractor/normalboots.py diff --git a/youtube_dl/extractor/nosvideo.py b/haruhi_dl/extractor/nosvideo.py similarity index 100% rename from youtube_dl/extractor/nosvideo.py rename to haruhi_dl/extractor/nosvideo.py diff --git a/youtube_dl/extractor/nova.py b/haruhi_dl/extractor/nova.py similarity index 100% rename from youtube_dl/extractor/nova.py rename to haruhi_dl/extractor/nova.py diff --git a/youtube_dl/extractor/nowness.py b/haruhi_dl/extractor/nowness.py similarity index 98% rename from youtube_dl/extractor/nowness.py rename to haruhi_dl/extractor/nowness.py index f26dafb8f..237e75233 100644 --- a/youtube_dl/extractor/nowness.py +++ b/haruhi_dl/extractor/nowness.py @@ -37,7 +37,7 @@ class NownessBaseIE(InfoExtractor): elif source == 'youtube': return self.url_result(video_id, 'Youtube') elif source == 'cinematique': - # youtube-dl currently doesn't support cinematique + # haruhi-dl currently doesn't support cinematique # return self.url_result('http://cinematique.com/embed/%s' % video_id, 'Cinematique') pass diff --git a/youtube_dl/extractor/noz.py b/haruhi_dl/extractor/noz.py similarity index 100% rename from youtube_dl/extractor/noz.py rename to haruhi_dl/extractor/noz.py diff --git a/youtube_dl/extractor/npo.py b/haruhi_dl/extractor/npo.py similarity index 100% rename from youtube_dl/extractor/npo.py rename to haruhi_dl/extractor/npo.py diff --git a/youtube_dl/extractor/npr.py b/haruhi_dl/extractor/npr.py similarity index 100% rename from youtube_dl/extractor/npr.py rename to haruhi_dl/extractor/npr.py diff --git a/youtube_dl/extractor/nrk.py b/haruhi_dl/extractor/nrk.py similarity index 100% rename from youtube_dl/extractor/nrk.py rename to haruhi_dl/extractor/nrk.py diff --git a/youtube_dl/extractor/nrl.py b/haruhi_dl/extractor/nrl.py similarity index 100% rename from youtube_dl/extractor/nrl.py rename to haruhi_dl/extractor/nrl.py diff --git a/youtube_dl/extractor/ntvcojp.py b/haruhi_dl/extractor/ntvcojp.py similarity index 100% rename from youtube_dl/extractor/ntvcojp.py rename to haruhi_dl/extractor/ntvcojp.py diff --git a/youtube_dl/extractor/ntvde.py b/haruhi_dl/extractor/ntvde.py similarity index 100% rename from youtube_dl/extractor/ntvde.py rename to haruhi_dl/extractor/ntvde.py diff --git a/youtube_dl/extractor/ntvru.py b/haruhi_dl/extractor/ntvru.py similarity index 100% rename from youtube_dl/extractor/ntvru.py rename to haruhi_dl/extractor/ntvru.py diff --git a/youtube_dl/extractor/nuevo.py b/haruhi_dl/extractor/nuevo.py similarity index 100% rename from youtube_dl/extractor/nuevo.py rename to haruhi_dl/extractor/nuevo.py diff --git a/youtube_dl/extractor/nuvid.py b/haruhi_dl/extractor/nuvid.py similarity index 100% rename from youtube_dl/extractor/nuvid.py rename to haruhi_dl/extractor/nuvid.py diff --git a/youtube_dl/extractor/nytimes.py b/haruhi_dl/extractor/nytimes.py similarity index 100% rename from youtube_dl/extractor/nytimes.py rename to haruhi_dl/extractor/nytimes.py diff --git a/youtube_dl/extractor/nzz.py b/haruhi_dl/extractor/nzz.py similarity index 100% rename from youtube_dl/extractor/nzz.py rename to haruhi_dl/extractor/nzz.py diff --git a/youtube_dl/extractor/odatv.py b/haruhi_dl/extractor/odatv.py similarity index 100% rename from youtube_dl/extractor/odatv.py rename to haruhi_dl/extractor/odatv.py diff --git a/youtube_dl/extractor/odnoklassniki.py b/haruhi_dl/extractor/odnoklassniki.py similarity index 100% rename from youtube_dl/extractor/odnoklassniki.py rename to haruhi_dl/extractor/odnoklassniki.py diff --git a/youtube_dl/extractor/oktoberfesttv.py b/haruhi_dl/extractor/oktoberfesttv.py similarity index 100% rename from youtube_dl/extractor/oktoberfesttv.py rename to haruhi_dl/extractor/oktoberfesttv.py diff --git a/youtube_dl/extractor/once.py b/haruhi_dl/extractor/once.py similarity index 95% rename from youtube_dl/extractor/once.py rename to haruhi_dl/extractor/once.py index 3e44b7829..0a0534d07 100644 --- a/youtube_dl/extractor/once.py +++ b/haruhi_dl/extractor/once.py @@ -21,7 +21,7 @@ class OnceIE(InfoExtractor): progressive_formats = [] for adaptive_format in formats: # Prevent advertisement from embedding into m3u8 playlist (see - # https://github.com/ytdl-org/youtube-dl/issues/8893#issuecomment-199912684) + # https://github.com/ytdl-org/haruhi-dl/issues/8893#issuecomment-199912684) adaptive_format['url'] = re.sub( r'\badsegmentlength=\d+', r'adsegmentlength=0', adaptive_format['url']) rendition_id = self._search_regex( diff --git a/youtube_dl/extractor/ondemandkorea.py b/haruhi_dl/extractor/ondemandkorea.py similarity index 100% rename from youtube_dl/extractor/ondemandkorea.py rename to haruhi_dl/extractor/ondemandkorea.py diff --git a/youtube_dl/extractor/onet.py b/haruhi_dl/extractor/onet.py similarity index 100% rename from youtube_dl/extractor/onet.py rename to haruhi_dl/extractor/onet.py diff --git a/youtube_dl/extractor/onionstudios.py b/haruhi_dl/extractor/onionstudios.py similarity index 100% rename from youtube_dl/extractor/onionstudios.py rename to haruhi_dl/extractor/onionstudios.py diff --git a/youtube_dl/extractor/ooyala.py b/haruhi_dl/extractor/ooyala.py similarity index 100% rename from youtube_dl/extractor/ooyala.py rename to haruhi_dl/extractor/ooyala.py diff --git a/youtube_dl/extractor/openload.py b/haruhi_dl/extractor/openload.py similarity index 100% rename from youtube_dl/extractor/openload.py rename to haruhi_dl/extractor/openload.py diff --git a/youtube_dl/extractor/ora.py b/haruhi_dl/extractor/ora.py similarity index 100% rename from youtube_dl/extractor/ora.py rename to haruhi_dl/extractor/ora.py diff --git a/youtube_dl/extractor/orf.py b/haruhi_dl/extractor/orf.py similarity index 100% rename from youtube_dl/extractor/orf.py rename to haruhi_dl/extractor/orf.py diff --git a/youtube_dl/extractor/outsidetv.py b/haruhi_dl/extractor/outsidetv.py similarity index 100% rename from youtube_dl/extractor/outsidetv.py rename to haruhi_dl/extractor/outsidetv.py diff --git a/youtube_dl/extractor/packtpub.py b/haruhi_dl/extractor/packtpub.py similarity index 100% rename from youtube_dl/extractor/packtpub.py rename to haruhi_dl/extractor/packtpub.py diff --git a/youtube_dl/extractor/pandoratv.py b/haruhi_dl/extractor/pandoratv.py similarity index 100% rename from youtube_dl/extractor/pandoratv.py rename to haruhi_dl/extractor/pandoratv.py diff --git a/youtube_dl/extractor/parliamentliveuk.py b/haruhi_dl/extractor/parliamentliveuk.py similarity index 100% rename from youtube_dl/extractor/parliamentliveuk.py rename to haruhi_dl/extractor/parliamentliveuk.py diff --git a/youtube_dl/extractor/patreon.py b/haruhi_dl/extractor/patreon.py similarity index 100% rename from youtube_dl/extractor/patreon.py rename to haruhi_dl/extractor/patreon.py diff --git a/youtube_dl/extractor/pbs.py b/haruhi_dl/extractor/pbs.py similarity index 99% rename from youtube_dl/extractor/pbs.py rename to haruhi_dl/extractor/pbs.py index 4dbe661be..239d848d6 100644 --- a/youtube_dl/extractor/pbs.py +++ b/haruhi_dl/extractor/pbs.py @@ -305,7 +305,7 @@ class PBSIE(InfoExtractor): { # Video embedded in iframe containing angle brackets as attribute's value (e.g. # "<iframe style='position: absolute;<br />\ntop: 0; left: 0;' ...", see - # https://github.com/ytdl-org/youtube-dl/issues/7059) + # https://github.com/ytdl-org/haruhi-dl/issues/7059) 'url': 'http://www.pbs.org/food/features/a-chefs-life-season-3-episode-5-prickly-business/', 'md5': '59b0ef5009f9ac8a319cc5efebcd865e', 'info_dict': { @@ -348,7 +348,7 @@ class PBSIE(InfoExtractor): }, }, { - # https://github.com/ytdl-org/youtube-dl/issues/13801 + # https://github.com/ytdl-org/haruhi-dl/issues/13801 'url': 'https://www.pbs.org/video/pbs-newshour-full-episode-july-31-2017-1501539057/', 'info_dict': { 'id': '3003333873', @@ -642,7 +642,7 @@ class PBSIE(InfoExtractor): # we won't try extracting them. # Since summer 2016 higher quality formats (4500k and 6500k) are also available # albeit they are not documented in [2]. - # 1. https://github.com/ytdl-org/youtube-dl/commit/cbc032c8b70a038a69259378c92b4ba97b42d491#commitcomment-17313656 + # 1. https://github.com/ytdl-org/haruhi-dl/commit/cbc032c8b70a038a69259378c92b4ba97b42d491#commitcomment-17313656 # 2. https://projects.pbs.org/confluence/display/coveapi/COVE+Video+Specifications if not bitrate or int(bitrate) < 400: continue diff --git a/youtube_dl/extractor/pearvideo.py b/haruhi_dl/extractor/pearvideo.py similarity index 100% rename from youtube_dl/extractor/pearvideo.py rename to haruhi_dl/extractor/pearvideo.py diff --git a/youtube_dl/extractor/peertube.py b/haruhi_dl/extractor/peertube.py similarity index 100% rename from youtube_dl/extractor/peertube.py rename to haruhi_dl/extractor/peertube.py diff --git a/youtube_dl/extractor/people.py b/haruhi_dl/extractor/people.py similarity index 100% rename from youtube_dl/extractor/people.py rename to haruhi_dl/extractor/people.py diff --git a/youtube_dl/extractor/performgroup.py b/haruhi_dl/extractor/performgroup.py similarity index 100% rename from youtube_dl/extractor/performgroup.py rename to haruhi_dl/extractor/performgroup.py diff --git a/youtube_dl/extractor/periscope.py b/haruhi_dl/extractor/periscope.py similarity index 100% rename from youtube_dl/extractor/periscope.py rename to haruhi_dl/extractor/periscope.py diff --git a/youtube_dl/extractor/philharmoniedeparis.py b/haruhi_dl/extractor/philharmoniedeparis.py similarity index 100% rename from youtube_dl/extractor/philharmoniedeparis.py rename to haruhi_dl/extractor/philharmoniedeparis.py diff --git a/youtube_dl/extractor/phoenix.py b/haruhi_dl/extractor/phoenix.py similarity index 100% rename from youtube_dl/extractor/phoenix.py rename to haruhi_dl/extractor/phoenix.py diff --git a/youtube_dl/extractor/photobucket.py b/haruhi_dl/extractor/photobucket.py similarity index 100% rename from youtube_dl/extractor/photobucket.py rename to haruhi_dl/extractor/photobucket.py diff --git a/youtube_dl/extractor/picarto.py b/haruhi_dl/extractor/picarto.py similarity index 100% rename from youtube_dl/extractor/picarto.py rename to haruhi_dl/extractor/picarto.py diff --git a/youtube_dl/extractor/piksel.py b/haruhi_dl/extractor/piksel.py similarity index 100% rename from youtube_dl/extractor/piksel.py rename to haruhi_dl/extractor/piksel.py diff --git a/youtube_dl/extractor/pinkbike.py b/haruhi_dl/extractor/pinkbike.py similarity index 100% rename from youtube_dl/extractor/pinkbike.py rename to haruhi_dl/extractor/pinkbike.py diff --git a/youtube_dl/extractor/pladform.py b/haruhi_dl/extractor/pladform.py similarity index 100% rename from youtube_dl/extractor/pladform.py rename to haruhi_dl/extractor/pladform.py diff --git a/youtube_dl/extractor/platzi.py b/haruhi_dl/extractor/platzi.py similarity index 100% rename from youtube_dl/extractor/platzi.py rename to haruhi_dl/extractor/platzi.py diff --git a/youtube_dl/extractor/playfm.py b/haruhi_dl/extractor/playfm.py similarity index 100% rename from youtube_dl/extractor/playfm.py rename to haruhi_dl/extractor/playfm.py diff --git a/youtube_dl/extractor/playplustv.py b/haruhi_dl/extractor/playplustv.py similarity index 100% rename from youtube_dl/extractor/playplustv.py rename to haruhi_dl/extractor/playplustv.py diff --git a/youtube_dl/extractor/plays.py b/haruhi_dl/extractor/plays.py similarity index 100% rename from youtube_dl/extractor/plays.py rename to haruhi_dl/extractor/plays.py diff --git a/youtube_dl/extractor/playtvak.py b/haruhi_dl/extractor/playtvak.py similarity index 100% rename from youtube_dl/extractor/playtvak.py rename to haruhi_dl/extractor/playtvak.py diff --git a/youtube_dl/extractor/playvid.py b/haruhi_dl/extractor/playvid.py similarity index 100% rename from youtube_dl/extractor/playvid.py rename to haruhi_dl/extractor/playvid.py diff --git a/youtube_dl/extractor/playwire.py b/haruhi_dl/extractor/playwire.py similarity index 100% rename from youtube_dl/extractor/playwire.py rename to haruhi_dl/extractor/playwire.py diff --git a/youtube_dl/extractor/pluralsight.py b/haruhi_dl/extractor/pluralsight.py similarity index 99% rename from youtube_dl/extractor/pluralsight.py rename to haruhi_dl/extractor/pluralsight.py index abd08bc28..0cf305c89 100644 --- a/youtube_dl/extractor/pluralsight.py +++ b/haruhi_dl/extractor/pluralsight.py @@ -327,7 +327,7 @@ query viewClip { ) # Some courses also offer widescreen resolution for high quality (see - # https://github.com/ytdl-org/youtube-dl/issues/7766) + # https://github.com/ytdl-org/haruhi-dl/issues/7766) widescreen = course.get('supportsWideScreenVideoFormats') is True best_quality = 'high-widescreen' if widescreen else 'high' if widescreen: @@ -388,8 +388,8 @@ query viewClip { # Pluralsight tracks multiple sequential calls to ViewClip API and start # to return 429 HTTP errors after some time (see - # https://github.com/ytdl-org/youtube-dl/pull/6989). Moreover it may even lead - # to account ban (see https://github.com/ytdl-org/youtube-dl/issues/6842). + # https://github.com/ytdl-org/haruhi-dl/pull/6989). Moreover it may even lead + # to account ban (see https://github.com/ytdl-org/haruhi-dl/issues/6842). # To somewhat reduce the probability of these consequences # we will sleep random amount of time before each call to ViewClip. self._sleep( diff --git a/youtube_dl/extractor/podomatic.py b/haruhi_dl/extractor/podomatic.py similarity index 100% rename from youtube_dl/extractor/podomatic.py rename to haruhi_dl/extractor/podomatic.py diff --git a/youtube_dl/extractor/pokemon.py b/haruhi_dl/extractor/pokemon.py similarity index 100% rename from youtube_dl/extractor/pokemon.py rename to haruhi_dl/extractor/pokemon.py diff --git a/youtube_dl/extractor/polskieradio.py b/haruhi_dl/extractor/polskieradio.py similarity index 100% rename from youtube_dl/extractor/polskieradio.py rename to haruhi_dl/extractor/polskieradio.py diff --git a/youtube_dl/extractor/popcorntimes.py b/haruhi_dl/extractor/popcorntimes.py similarity index 100% rename from youtube_dl/extractor/popcorntimes.py rename to haruhi_dl/extractor/popcorntimes.py diff --git a/youtube_dl/extractor/popcorntv.py b/haruhi_dl/extractor/popcorntv.py similarity index 100% rename from youtube_dl/extractor/popcorntv.py rename to haruhi_dl/extractor/popcorntv.py diff --git a/youtube_dl/extractor/porn91.py b/haruhi_dl/extractor/porn91.py similarity index 100% rename from youtube_dl/extractor/porn91.py rename to haruhi_dl/extractor/porn91.py diff --git a/youtube_dl/extractor/porncom.py b/haruhi_dl/extractor/porncom.py similarity index 100% rename from youtube_dl/extractor/porncom.py rename to haruhi_dl/extractor/porncom.py diff --git a/youtube_dl/extractor/pornhd.py b/haruhi_dl/extractor/pornhd.py similarity index 100% rename from youtube_dl/extractor/pornhd.py rename to haruhi_dl/extractor/pornhd.py diff --git a/youtube_dl/extractor/pornhub.py b/haruhi_dl/extractor/pornhub.py similarity index 99% rename from youtube_dl/extractor/pornhub.py rename to haruhi_dl/extractor/pornhub.py index 529f3f711..a7301b671 100644 --- a/youtube_dl/extractor/pornhub.py +++ b/haruhi_dl/extractor/pornhub.py @@ -386,7 +386,7 @@ class PornHubPlaylistBaseIE(PornHubBaseIE): def _extract_entries(self, webpage, host): # Only process container div with main playlist content skipping # drop-down menu that uses similar pattern for videos (see - # https://github.com/ytdl-org/youtube-dl/issues/11594). + # https://github.com/ytdl-org/haruhi-dl/issues/11594). container = self._search_regex( r'(?s)(<div[^>]+class=["\']container.+)', webpage, 'container', default=webpage) diff --git a/youtube_dl/extractor/pornotube.py b/haruhi_dl/extractor/pornotube.py similarity index 100% rename from youtube_dl/extractor/pornotube.py rename to haruhi_dl/extractor/pornotube.py diff --git a/youtube_dl/extractor/pornovoisines.py b/haruhi_dl/extractor/pornovoisines.py similarity index 100% rename from youtube_dl/extractor/pornovoisines.py rename to haruhi_dl/extractor/pornovoisines.py diff --git a/youtube_dl/extractor/pornoxo.py b/haruhi_dl/extractor/pornoxo.py similarity index 100% rename from youtube_dl/extractor/pornoxo.py rename to haruhi_dl/extractor/pornoxo.py diff --git a/youtube_dl/extractor/presstv.py b/haruhi_dl/extractor/presstv.py similarity index 100% rename from youtube_dl/extractor/presstv.py rename to haruhi_dl/extractor/presstv.py diff --git a/youtube_dl/extractor/prosiebensat1.py b/haruhi_dl/extractor/prosiebensat1.py similarity index 99% rename from youtube_dl/extractor/prosiebensat1.py rename to haruhi_dl/extractor/prosiebensat1.py index e47088292..c7122508b 100644 --- a/youtube_dl/extractor/prosiebensat1.py +++ b/haruhi_dl/extractor/prosiebensat1.py @@ -185,8 +185,8 @@ class ProSiebenSat1IE(ProSiebenSat1BaseIE): _TESTS = [ { - # Tests changes introduced in https://github.com/ytdl-org/youtube-dl/pull/6242 - # in response to fixing https://github.com/ytdl-org/youtube-dl/issues/6215: + # Tests changes introduced in https://github.com/ytdl-org/haruhi-dl/pull/6242 + # in response to fixing https://github.com/ytdl-org/haruhi-dl/issues/6215: # - malformed f4m manifest support # - proper handling of URLs starting with `https?://` in 2.0 manifests # - recursive child f4m manifests extraction diff --git a/youtube_dl/extractor/puhutv.py b/haruhi_dl/extractor/puhutv.py similarity index 100% rename from youtube_dl/extractor/puhutv.py rename to haruhi_dl/extractor/puhutv.py diff --git a/youtube_dl/extractor/puls4.py b/haruhi_dl/extractor/puls4.py similarity index 100% rename from youtube_dl/extractor/puls4.py rename to haruhi_dl/extractor/puls4.py diff --git a/youtube_dl/extractor/pyvideo.py b/haruhi_dl/extractor/pyvideo.py similarity index 100% rename from youtube_dl/extractor/pyvideo.py rename to haruhi_dl/extractor/pyvideo.py diff --git a/youtube_dl/extractor/qqmusic.py b/haruhi_dl/extractor/qqmusic.py similarity index 100% rename from youtube_dl/extractor/qqmusic.py rename to haruhi_dl/extractor/qqmusic.py diff --git a/youtube_dl/extractor/r7.py b/haruhi_dl/extractor/r7.py similarity index 100% rename from youtube_dl/extractor/r7.py rename to haruhi_dl/extractor/r7.py diff --git a/youtube_dl/extractor/radiobremen.py b/haruhi_dl/extractor/radiobremen.py similarity index 100% rename from youtube_dl/extractor/radiobremen.py rename to haruhi_dl/extractor/radiobremen.py diff --git a/youtube_dl/extractor/radiocanada.py b/haruhi_dl/extractor/radiocanada.py similarity index 99% rename from youtube_dl/extractor/radiocanada.py rename to haruhi_dl/extractor/radiocanada.py index a28b1a24c..736db7cd9 100644 --- a/youtube_dl/extractor/radiocanada.py +++ b/haruhi_dl/extractor/radiocanada.py @@ -96,7 +96,7 @@ class RadioCanadaIE(InfoExtractor): return text # protectionType does not necessarily mean the video is DRM protected (see - # https://github.com/ytdl-org/youtube-dl/pull/18609). + # https://github.com/ytdl-org/haruhi-dl/pull/18609). if get_meta('protectionType'): self.report_warning('This video is probably DRM protected.') diff --git a/youtube_dl/extractor/radiode.py b/haruhi_dl/extractor/radiode.py similarity index 100% rename from youtube_dl/extractor/radiode.py rename to haruhi_dl/extractor/radiode.py diff --git a/youtube_dl/extractor/radiofrance.py b/haruhi_dl/extractor/radiofrance.py similarity index 100% rename from youtube_dl/extractor/radiofrance.py rename to haruhi_dl/extractor/radiofrance.py diff --git a/youtube_dl/extractor/radiojavan.py b/haruhi_dl/extractor/radiojavan.py similarity index 100% rename from youtube_dl/extractor/radiojavan.py rename to haruhi_dl/extractor/radiojavan.py diff --git a/youtube_dl/extractor/rai.py b/haruhi_dl/extractor/rai.py similarity index 100% rename from youtube_dl/extractor/rai.py rename to haruhi_dl/extractor/rai.py diff --git a/youtube_dl/extractor/raywenderlich.py b/haruhi_dl/extractor/raywenderlich.py similarity index 100% rename from youtube_dl/extractor/raywenderlich.py rename to haruhi_dl/extractor/raywenderlich.py diff --git a/youtube_dl/extractor/rbmaradio.py b/haruhi_dl/extractor/rbmaradio.py similarity index 100% rename from youtube_dl/extractor/rbmaradio.py rename to haruhi_dl/extractor/rbmaradio.py diff --git a/youtube_dl/extractor/rds.py b/haruhi_dl/extractor/rds.py similarity index 100% rename from youtube_dl/extractor/rds.py rename to haruhi_dl/extractor/rds.py diff --git a/youtube_dl/extractor/redbulltv.py b/haruhi_dl/extractor/redbulltv.py similarity index 100% rename from youtube_dl/extractor/redbulltv.py rename to haruhi_dl/extractor/redbulltv.py diff --git a/youtube_dl/extractor/reddit.py b/haruhi_dl/extractor/reddit.py similarity index 100% rename from youtube_dl/extractor/reddit.py rename to haruhi_dl/extractor/reddit.py diff --git a/youtube_dl/extractor/redtube.py b/haruhi_dl/extractor/redtube.py similarity index 100% rename from youtube_dl/extractor/redtube.py rename to haruhi_dl/extractor/redtube.py diff --git a/youtube_dl/extractor/regiotv.py b/haruhi_dl/extractor/regiotv.py similarity index 100% rename from youtube_dl/extractor/regiotv.py rename to haruhi_dl/extractor/regiotv.py diff --git a/youtube_dl/extractor/rentv.py b/haruhi_dl/extractor/rentv.py similarity index 100% rename from youtube_dl/extractor/rentv.py rename to haruhi_dl/extractor/rentv.py diff --git a/youtube_dl/extractor/restudy.py b/haruhi_dl/extractor/restudy.py similarity index 100% rename from youtube_dl/extractor/restudy.py rename to haruhi_dl/extractor/restudy.py diff --git a/youtube_dl/extractor/reuters.py b/haruhi_dl/extractor/reuters.py similarity index 100% rename from youtube_dl/extractor/reuters.py rename to haruhi_dl/extractor/reuters.py diff --git a/youtube_dl/extractor/reverbnation.py b/haruhi_dl/extractor/reverbnation.py similarity index 100% rename from youtube_dl/extractor/reverbnation.py rename to haruhi_dl/extractor/reverbnation.py diff --git a/youtube_dl/extractor/rice.py b/haruhi_dl/extractor/rice.py similarity index 100% rename from youtube_dl/extractor/rice.py rename to haruhi_dl/extractor/rice.py diff --git a/youtube_dl/extractor/rmcdecouverte.py b/haruhi_dl/extractor/rmcdecouverte.py similarity index 100% rename from youtube_dl/extractor/rmcdecouverte.py rename to haruhi_dl/extractor/rmcdecouverte.py diff --git a/youtube_dl/extractor/ro220.py b/haruhi_dl/extractor/ro220.py similarity index 100% rename from youtube_dl/extractor/ro220.py rename to haruhi_dl/extractor/ro220.py diff --git a/youtube_dl/extractor/rockstargames.py b/haruhi_dl/extractor/rockstargames.py similarity index 100% rename from youtube_dl/extractor/rockstargames.py rename to haruhi_dl/extractor/rockstargames.py diff --git a/youtube_dl/extractor/roosterteeth.py b/haruhi_dl/extractor/roosterteeth.py similarity index 100% rename from youtube_dl/extractor/roosterteeth.py rename to haruhi_dl/extractor/roosterteeth.py diff --git a/youtube_dl/extractor/rottentomatoes.py b/haruhi_dl/extractor/rottentomatoes.py similarity index 100% rename from youtube_dl/extractor/rottentomatoes.py rename to haruhi_dl/extractor/rottentomatoes.py diff --git a/youtube_dl/extractor/roxwel.py b/haruhi_dl/extractor/roxwel.py similarity index 100% rename from youtube_dl/extractor/roxwel.py rename to haruhi_dl/extractor/roxwel.py diff --git a/youtube_dl/extractor/rozhlas.py b/haruhi_dl/extractor/rozhlas.py similarity index 100% rename from youtube_dl/extractor/rozhlas.py rename to haruhi_dl/extractor/rozhlas.py diff --git a/youtube_dl/extractor/rtbf.py b/haruhi_dl/extractor/rtbf.py similarity index 100% rename from youtube_dl/extractor/rtbf.py rename to haruhi_dl/extractor/rtbf.py diff --git a/youtube_dl/extractor/rte.py b/haruhi_dl/extractor/rte.py similarity index 100% rename from youtube_dl/extractor/rte.py rename to haruhi_dl/extractor/rte.py diff --git a/youtube_dl/extractor/rtl2.py b/haruhi_dl/extractor/rtl2.py similarity index 100% rename from youtube_dl/extractor/rtl2.py rename to haruhi_dl/extractor/rtl2.py diff --git a/youtube_dl/extractor/rtlnl.py b/haruhi_dl/extractor/rtlnl.py similarity index 99% rename from youtube_dl/extractor/rtlnl.py rename to haruhi_dl/extractor/rtlnl.py index 9eaa06f25..3d145a85a 100644 --- a/youtube_dl/extractor/rtlnl.py +++ b/haruhi_dl/extractor/rtlnl.py @@ -61,7 +61,7 @@ class RtlNlIE(InfoExtractor): 'description': 'Er zijn nieuwe beelden vrijgegeven die vlak na de aanslag in Kopenhagen zijn gemaakt. Op de video is goed te zien hoe omstanders zich bekommeren om één van de slachtoffers, terwijl de eerste agenten ter plaatse komen.', } }, { - # empty synopsis and missing episodes (see https://github.com/ytdl-org/youtube-dl/issues/6275) + # empty synopsis and missing episodes (see https://github.com/ytdl-org/haruhi-dl/issues/6275) # best format available nettv 'url': 'http://www.rtl.nl/system/videoplayer/derden/rtlnieuws/video_embed.html#uuid=f536aac0-1dc3-4314-920e-3bd1c5b3811a/autoplay=false', 'info_dict': { diff --git a/youtube_dl/extractor/rtp.py b/haruhi_dl/extractor/rtp.py similarity index 100% rename from youtube_dl/extractor/rtp.py rename to haruhi_dl/extractor/rtp.py diff --git a/youtube_dl/extractor/rts.py b/haruhi_dl/extractor/rts.py similarity index 100% rename from youtube_dl/extractor/rts.py rename to haruhi_dl/extractor/rts.py diff --git a/youtube_dl/extractor/rtve.py b/haruhi_dl/extractor/rtve.py similarity index 100% rename from youtube_dl/extractor/rtve.py rename to haruhi_dl/extractor/rtve.py diff --git a/youtube_dl/extractor/rtvnh.py b/haruhi_dl/extractor/rtvnh.py similarity index 100% rename from youtube_dl/extractor/rtvnh.py rename to haruhi_dl/extractor/rtvnh.py diff --git a/youtube_dl/extractor/rtvs.py b/haruhi_dl/extractor/rtvs.py similarity index 100% rename from youtube_dl/extractor/rtvs.py rename to haruhi_dl/extractor/rtvs.py diff --git a/youtube_dl/extractor/ruhd.py b/haruhi_dl/extractor/ruhd.py similarity index 100% rename from youtube_dl/extractor/ruhd.py rename to haruhi_dl/extractor/ruhd.py diff --git a/youtube_dl/extractor/rutube.py b/haruhi_dl/extractor/rutube.py similarity index 100% rename from youtube_dl/extractor/rutube.py rename to haruhi_dl/extractor/rutube.py diff --git a/youtube_dl/extractor/rutv.py b/haruhi_dl/extractor/rutv.py similarity index 100% rename from youtube_dl/extractor/rutv.py rename to haruhi_dl/extractor/rutv.py diff --git a/youtube_dl/extractor/ruutu.py b/haruhi_dl/extractor/ruutu.py similarity index 100% rename from youtube_dl/extractor/ruutu.py rename to haruhi_dl/extractor/ruutu.py diff --git a/youtube_dl/extractor/ruv.py b/haruhi_dl/extractor/ruv.py similarity index 100% rename from youtube_dl/extractor/ruv.py rename to haruhi_dl/extractor/ruv.py diff --git a/youtube_dl/extractor/safari.py b/haruhi_dl/extractor/safari.py similarity index 100% rename from youtube_dl/extractor/safari.py rename to haruhi_dl/extractor/safari.py diff --git a/youtube_dl/extractor/sapo.py b/haruhi_dl/extractor/sapo.py similarity index 100% rename from youtube_dl/extractor/sapo.py rename to haruhi_dl/extractor/sapo.py diff --git a/youtube_dl/extractor/savefrom.py b/haruhi_dl/extractor/savefrom.py similarity index 100% rename from youtube_dl/extractor/savefrom.py rename to haruhi_dl/extractor/savefrom.py diff --git a/youtube_dl/extractor/sbs.py b/haruhi_dl/extractor/sbs.py similarity index 100% rename from youtube_dl/extractor/sbs.py rename to haruhi_dl/extractor/sbs.py diff --git a/youtube_dl/extractor/screencast.py b/haruhi_dl/extractor/screencast.py similarity index 100% rename from youtube_dl/extractor/screencast.py rename to haruhi_dl/extractor/screencast.py diff --git a/youtube_dl/extractor/screencastomatic.py b/haruhi_dl/extractor/screencastomatic.py similarity index 100% rename from youtube_dl/extractor/screencastomatic.py rename to haruhi_dl/extractor/screencastomatic.py diff --git a/youtube_dl/extractor/scrippsnetworks.py b/haruhi_dl/extractor/scrippsnetworks.py similarity index 100% rename from youtube_dl/extractor/scrippsnetworks.py rename to haruhi_dl/extractor/scrippsnetworks.py diff --git a/youtube_dl/extractor/scte.py b/haruhi_dl/extractor/scte.py similarity index 100% rename from youtube_dl/extractor/scte.py rename to haruhi_dl/extractor/scte.py diff --git a/youtube_dl/extractor/seeker.py b/haruhi_dl/extractor/seeker.py similarity index 100% rename from youtube_dl/extractor/seeker.py rename to haruhi_dl/extractor/seeker.py diff --git a/youtube_dl/extractor/senateisvp.py b/haruhi_dl/extractor/senateisvp.py similarity index 100% rename from youtube_dl/extractor/senateisvp.py rename to haruhi_dl/extractor/senateisvp.py diff --git a/youtube_dl/extractor/sendtonews.py b/haruhi_dl/extractor/sendtonews.py similarity index 100% rename from youtube_dl/extractor/sendtonews.py rename to haruhi_dl/extractor/sendtonews.py diff --git a/youtube_dl/extractor/servus.py b/haruhi_dl/extractor/servus.py similarity index 100% rename from youtube_dl/extractor/servus.py rename to haruhi_dl/extractor/servus.py diff --git a/youtube_dl/extractor/sevenplus.py b/haruhi_dl/extractor/sevenplus.py similarity index 100% rename from youtube_dl/extractor/sevenplus.py rename to haruhi_dl/extractor/sevenplus.py diff --git a/youtube_dl/extractor/sexu.py b/haruhi_dl/extractor/sexu.py similarity index 100% rename from youtube_dl/extractor/sexu.py rename to haruhi_dl/extractor/sexu.py diff --git a/youtube_dl/extractor/seznamzpravy.py b/haruhi_dl/extractor/seznamzpravy.py similarity index 100% rename from youtube_dl/extractor/seznamzpravy.py rename to haruhi_dl/extractor/seznamzpravy.py diff --git a/youtube_dl/extractor/shahid.py b/haruhi_dl/extractor/shahid.py similarity index 100% rename from youtube_dl/extractor/shahid.py rename to haruhi_dl/extractor/shahid.py diff --git a/youtube_dl/extractor/shared.py b/haruhi_dl/extractor/shared.py similarity index 100% rename from youtube_dl/extractor/shared.py rename to haruhi_dl/extractor/shared.py diff --git a/youtube_dl/extractor/showroomlive.py b/haruhi_dl/extractor/showroomlive.py similarity index 100% rename from youtube_dl/extractor/showroomlive.py rename to haruhi_dl/extractor/showroomlive.py diff --git a/youtube_dl/extractor/sina.py b/haruhi_dl/extractor/sina.py similarity index 100% rename from youtube_dl/extractor/sina.py rename to haruhi_dl/extractor/sina.py diff --git a/youtube_dl/extractor/sixplay.py b/haruhi_dl/extractor/sixplay.py similarity index 100% rename from youtube_dl/extractor/sixplay.py rename to haruhi_dl/extractor/sixplay.py diff --git a/youtube_dl/extractor/sky.py b/haruhi_dl/extractor/sky.py similarity index 100% rename from youtube_dl/extractor/sky.py rename to haruhi_dl/extractor/sky.py diff --git a/youtube_dl/extractor/skylinewebcams.py b/haruhi_dl/extractor/skylinewebcams.py similarity index 100% rename from youtube_dl/extractor/skylinewebcams.py rename to haruhi_dl/extractor/skylinewebcams.py diff --git a/youtube_dl/extractor/skynewsarabia.py b/haruhi_dl/extractor/skynewsarabia.py similarity index 100% rename from youtube_dl/extractor/skynewsarabia.py rename to haruhi_dl/extractor/skynewsarabia.py diff --git a/youtube_dl/extractor/slideshare.py b/haruhi_dl/extractor/slideshare.py similarity index 100% rename from youtube_dl/extractor/slideshare.py rename to haruhi_dl/extractor/slideshare.py diff --git a/youtube_dl/extractor/slideslive.py b/haruhi_dl/extractor/slideslive.py similarity index 100% rename from youtube_dl/extractor/slideslive.py rename to haruhi_dl/extractor/slideslive.py diff --git a/youtube_dl/extractor/slutload.py b/haruhi_dl/extractor/slutload.py similarity index 100% rename from youtube_dl/extractor/slutload.py rename to haruhi_dl/extractor/slutload.py diff --git a/youtube_dl/extractor/smotri.py b/haruhi_dl/extractor/smotri.py similarity index 100% rename from youtube_dl/extractor/smotri.py rename to haruhi_dl/extractor/smotri.py diff --git a/youtube_dl/extractor/snotr.py b/haruhi_dl/extractor/snotr.py similarity index 100% rename from youtube_dl/extractor/snotr.py rename to haruhi_dl/extractor/snotr.py diff --git a/youtube_dl/extractor/sohu.py b/haruhi_dl/extractor/sohu.py similarity index 99% rename from youtube_dl/extractor/sohu.py rename to haruhi_dl/extractor/sohu.py index a62ed84f1..24ab2f388 100644 --- a/youtube_dl/extractor/sohu.py +++ b/haruhi_dl/extractor/sohu.py @@ -77,7 +77,7 @@ class SohuIE(InfoExtractor): 'info_dict': { 'id': '78932792', 'ext': 'mp4', - 'title': 'youtube-dl testing video', + 'title': 'haruhi-dl testing video', }, 'params': { 'skip_download': True diff --git a/youtube_dl/extractor/sonyliv.py b/haruhi_dl/extractor/sonyliv.py similarity index 100% rename from youtube_dl/extractor/sonyliv.py rename to haruhi_dl/extractor/sonyliv.py diff --git a/youtube_dl/extractor/soundcloud.py b/haruhi_dl/extractor/soundcloud.py similarity index 99% rename from youtube_dl/extractor/soundcloud.py rename to haruhi_dl/extractor/soundcloud.py index a2fddf6d9..0b787444c 100644 --- a/youtube_dl/extractor/soundcloud.py +++ b/haruhi_dl/extractor/soundcloud.py @@ -119,7 +119,7 @@ class SoundcloudIE(InfoExtractor): }, # private link { - 'url': 'https://soundcloud.com/jaimemf/youtube-dl-test-video-a-y-baw/s-8Pjrp', + 'url': 'https://soundcloud.com/jaimemf/haruhi-dl-test-video-a-y-baw/s-8Pjrp', 'md5': 'aa0dd32bfea9b0c5ef4f02aacd080604', 'info_dict': { 'id': '123998367', diff --git a/youtube_dl/extractor/soundgasm.py b/haruhi_dl/extractor/soundgasm.py similarity index 100% rename from youtube_dl/extractor/soundgasm.py rename to haruhi_dl/extractor/soundgasm.py diff --git a/youtube_dl/extractor/southpark.py b/haruhi_dl/extractor/southpark.py similarity index 100% rename from youtube_dl/extractor/southpark.py rename to haruhi_dl/extractor/southpark.py diff --git a/youtube_dl/extractor/spankbang.py b/haruhi_dl/extractor/spankbang.py similarity index 100% rename from youtube_dl/extractor/spankbang.py rename to haruhi_dl/extractor/spankbang.py diff --git a/youtube_dl/extractor/spankwire.py b/haruhi_dl/extractor/spankwire.py similarity index 100% rename from youtube_dl/extractor/spankwire.py rename to haruhi_dl/extractor/spankwire.py diff --git a/youtube_dl/extractor/spiegel.py b/haruhi_dl/extractor/spiegel.py similarity index 100% rename from youtube_dl/extractor/spiegel.py rename to haruhi_dl/extractor/spiegel.py diff --git a/youtube_dl/extractor/spiegeltv.py b/haruhi_dl/extractor/spiegeltv.py similarity index 100% rename from youtube_dl/extractor/spiegeltv.py rename to haruhi_dl/extractor/spiegeltv.py diff --git a/youtube_dl/extractor/spike.py b/haruhi_dl/extractor/spike.py similarity index 100% rename from youtube_dl/extractor/spike.py rename to haruhi_dl/extractor/spike.py diff --git a/youtube_dl/extractor/sport5.py b/haruhi_dl/extractor/sport5.py similarity index 100% rename from youtube_dl/extractor/sport5.py rename to haruhi_dl/extractor/sport5.py diff --git a/youtube_dl/extractor/sportbox.py b/haruhi_dl/extractor/sportbox.py similarity index 100% rename from youtube_dl/extractor/sportbox.py rename to haruhi_dl/extractor/sportbox.py diff --git a/youtube_dl/extractor/sportdeutschland.py b/haruhi_dl/extractor/sportdeutschland.py similarity index 100% rename from youtube_dl/extractor/sportdeutschland.py rename to haruhi_dl/extractor/sportdeutschland.py diff --git a/youtube_dl/extractor/springboardplatform.py b/haruhi_dl/extractor/springboardplatform.py similarity index 100% rename from youtube_dl/extractor/springboardplatform.py rename to haruhi_dl/extractor/springboardplatform.py diff --git a/youtube_dl/extractor/sprout.py b/haruhi_dl/extractor/sprout.py similarity index 100% rename from youtube_dl/extractor/sprout.py rename to haruhi_dl/extractor/sprout.py diff --git a/youtube_dl/extractor/srgssr.py b/haruhi_dl/extractor/srgssr.py similarity index 100% rename from youtube_dl/extractor/srgssr.py rename to haruhi_dl/extractor/srgssr.py diff --git a/youtube_dl/extractor/srmediathek.py b/haruhi_dl/extractor/srmediathek.py similarity index 100% rename from youtube_dl/extractor/srmediathek.py rename to haruhi_dl/extractor/srmediathek.py diff --git a/youtube_dl/extractor/stanfordoc.py b/haruhi_dl/extractor/stanfordoc.py similarity index 100% rename from youtube_dl/extractor/stanfordoc.py rename to haruhi_dl/extractor/stanfordoc.py diff --git a/youtube_dl/extractor/steam.py b/haruhi_dl/extractor/steam.py similarity index 100% rename from youtube_dl/extractor/steam.py rename to haruhi_dl/extractor/steam.py diff --git a/youtube_dl/extractor/stitcher.py b/haruhi_dl/extractor/stitcher.py similarity index 100% rename from youtube_dl/extractor/stitcher.py rename to haruhi_dl/extractor/stitcher.py diff --git a/youtube_dl/extractor/streamable.py b/haruhi_dl/extractor/streamable.py similarity index 100% rename from youtube_dl/extractor/streamable.py rename to haruhi_dl/extractor/streamable.py diff --git a/youtube_dl/extractor/streamcloud.py b/haruhi_dl/extractor/streamcloud.py similarity index 93% rename from youtube_dl/extractor/streamcloud.py rename to haruhi_dl/extractor/streamcloud.py index b97bb4374..6ee1b4717 100644 --- a/youtube_dl/extractor/streamcloud.py +++ b/haruhi_dl/extractor/streamcloud.py @@ -15,12 +15,12 @@ class StreamcloudIE(InfoExtractor): _VALID_URL = r'https?://streamcloud\.eu/(?P<id>[a-zA-Z0-9_-]+)(?:/(?P<fname>[^#?]*)\.html)?' _TESTS = [{ - 'url': 'http://streamcloud.eu/skp9j99s4bpz/youtube-dl_test_video_____________-BaW_jenozKc.mp4.html', + 'url': 'http://streamcloud.eu/skp9j99s4bpz/haruhi-dl_test_video_____________-BaW_jenozKc.mp4.html', 'md5': '6bea4c7fa5daaacc2a946b7146286686', 'info_dict': { 'id': 'skp9j99s4bpz', 'ext': 'mp4', - 'title': 'youtube-dl test video \'/\\ ä ↭', + 'title': 'haruhi-dl test video \'/\\ ä ↭', }, 'skip': 'Only available from the EU' }, { diff --git a/youtube_dl/extractor/streamcz.py b/haruhi_dl/extractor/streamcz.py similarity index 100% rename from youtube_dl/extractor/streamcz.py rename to haruhi_dl/extractor/streamcz.py diff --git a/youtube_dl/extractor/streetvoice.py b/haruhi_dl/extractor/streetvoice.py similarity index 100% rename from youtube_dl/extractor/streetvoice.py rename to haruhi_dl/extractor/streetvoice.py diff --git a/youtube_dl/extractor/stretchinternet.py b/haruhi_dl/extractor/stretchinternet.py similarity index 100% rename from youtube_dl/extractor/stretchinternet.py rename to haruhi_dl/extractor/stretchinternet.py diff --git a/youtube_dl/extractor/stv.py b/haruhi_dl/extractor/stv.py similarity index 100% rename from youtube_dl/extractor/stv.py rename to haruhi_dl/extractor/stv.py diff --git a/youtube_dl/extractor/sunporno.py b/haruhi_dl/extractor/sunporno.py similarity index 100% rename from youtube_dl/extractor/sunporno.py rename to haruhi_dl/extractor/sunporno.py diff --git a/youtube_dl/extractor/sverigesradio.py b/haruhi_dl/extractor/sverigesradio.py similarity index 100% rename from youtube_dl/extractor/sverigesradio.py rename to haruhi_dl/extractor/sverigesradio.py diff --git a/youtube_dl/extractor/svt.py b/haruhi_dl/extractor/svt.py similarity index 100% rename from youtube_dl/extractor/svt.py rename to haruhi_dl/extractor/svt.py diff --git a/youtube_dl/extractor/swrmediathek.py b/haruhi_dl/extractor/swrmediathek.py similarity index 100% rename from youtube_dl/extractor/swrmediathek.py rename to haruhi_dl/extractor/swrmediathek.py diff --git a/youtube_dl/extractor/syfy.py b/haruhi_dl/extractor/syfy.py similarity index 100% rename from youtube_dl/extractor/syfy.py rename to haruhi_dl/extractor/syfy.py diff --git a/youtube_dl/extractor/sztvhu.py b/haruhi_dl/extractor/sztvhu.py similarity index 100% rename from youtube_dl/extractor/sztvhu.py rename to haruhi_dl/extractor/sztvhu.py diff --git a/youtube_dl/extractor/tagesschau.py b/haruhi_dl/extractor/tagesschau.py similarity index 100% rename from youtube_dl/extractor/tagesschau.py rename to haruhi_dl/extractor/tagesschau.py diff --git a/youtube_dl/extractor/tass.py b/haruhi_dl/extractor/tass.py similarity index 100% rename from youtube_dl/extractor/tass.py rename to haruhi_dl/extractor/tass.py diff --git a/youtube_dl/extractor/tastytrade.py b/haruhi_dl/extractor/tastytrade.py similarity index 100% rename from youtube_dl/extractor/tastytrade.py rename to haruhi_dl/extractor/tastytrade.py diff --git a/youtube_dl/extractor/tbs.py b/haruhi_dl/extractor/tbs.py similarity index 100% rename from youtube_dl/extractor/tbs.py rename to haruhi_dl/extractor/tbs.py diff --git a/youtube_dl/extractor/tdslifeway.py b/haruhi_dl/extractor/tdslifeway.py similarity index 100% rename from youtube_dl/extractor/tdslifeway.py rename to haruhi_dl/extractor/tdslifeway.py diff --git a/youtube_dl/extractor/teachable.py b/haruhi_dl/extractor/teachable.py similarity index 100% rename from youtube_dl/extractor/teachable.py rename to haruhi_dl/extractor/teachable.py diff --git a/youtube_dl/extractor/teachertube.py b/haruhi_dl/extractor/teachertube.py similarity index 100% rename from youtube_dl/extractor/teachertube.py rename to haruhi_dl/extractor/teachertube.py diff --git a/youtube_dl/extractor/teachingchannel.py b/haruhi_dl/extractor/teachingchannel.py similarity index 100% rename from youtube_dl/extractor/teachingchannel.py rename to haruhi_dl/extractor/teachingchannel.py diff --git a/youtube_dl/extractor/teamcoco.py b/haruhi_dl/extractor/teamcoco.py similarity index 100% rename from youtube_dl/extractor/teamcoco.py rename to haruhi_dl/extractor/teamcoco.py diff --git a/youtube_dl/extractor/teamtreehouse.py b/haruhi_dl/extractor/teamtreehouse.py similarity index 100% rename from youtube_dl/extractor/teamtreehouse.py rename to haruhi_dl/extractor/teamtreehouse.py diff --git a/youtube_dl/extractor/techtalks.py b/haruhi_dl/extractor/techtalks.py similarity index 100% rename from youtube_dl/extractor/techtalks.py rename to haruhi_dl/extractor/techtalks.py diff --git a/youtube_dl/extractor/ted.py b/haruhi_dl/extractor/ted.py similarity index 100% rename from youtube_dl/extractor/ted.py rename to haruhi_dl/extractor/ted.py diff --git a/youtube_dl/extractor/tele13.py b/haruhi_dl/extractor/tele13.py similarity index 100% rename from youtube_dl/extractor/tele13.py rename to haruhi_dl/extractor/tele13.py diff --git a/youtube_dl/extractor/tele5.py b/haruhi_dl/extractor/tele5.py similarity index 100% rename from youtube_dl/extractor/tele5.py rename to haruhi_dl/extractor/tele5.py diff --git a/youtube_dl/extractor/telebruxelles.py b/haruhi_dl/extractor/telebruxelles.py similarity index 100% rename from youtube_dl/extractor/telebruxelles.py rename to haruhi_dl/extractor/telebruxelles.py diff --git a/youtube_dl/extractor/telecinco.py b/haruhi_dl/extractor/telecinco.py similarity index 100% rename from youtube_dl/extractor/telecinco.py rename to haruhi_dl/extractor/telecinco.py diff --git a/youtube_dl/extractor/telegraaf.py b/haruhi_dl/extractor/telegraaf.py similarity index 100% rename from youtube_dl/extractor/telegraaf.py rename to haruhi_dl/extractor/telegraaf.py diff --git a/youtube_dl/extractor/telemb.py b/haruhi_dl/extractor/telemb.py similarity index 100% rename from youtube_dl/extractor/telemb.py rename to haruhi_dl/extractor/telemb.py diff --git a/youtube_dl/extractor/telequebec.py b/haruhi_dl/extractor/telequebec.py similarity index 100% rename from youtube_dl/extractor/telequebec.py rename to haruhi_dl/extractor/telequebec.py diff --git a/youtube_dl/extractor/teletask.py b/haruhi_dl/extractor/teletask.py similarity index 100% rename from youtube_dl/extractor/teletask.py rename to haruhi_dl/extractor/teletask.py diff --git a/youtube_dl/extractor/telewebion.py b/haruhi_dl/extractor/telewebion.py similarity index 100% rename from youtube_dl/extractor/telewebion.py rename to haruhi_dl/extractor/telewebion.py diff --git a/youtube_dl/extractor/tennistv.py b/haruhi_dl/extractor/tennistv.py similarity index 100% rename from youtube_dl/extractor/tennistv.py rename to haruhi_dl/extractor/tennistv.py diff --git a/youtube_dl/extractor/tenplay.py b/haruhi_dl/extractor/tenplay.py similarity index 100% rename from youtube_dl/extractor/tenplay.py rename to haruhi_dl/extractor/tenplay.py diff --git a/youtube_dl/extractor/testurl.py b/haruhi_dl/extractor/testurl.py similarity index 100% rename from youtube_dl/extractor/testurl.py rename to haruhi_dl/extractor/testurl.py diff --git a/youtube_dl/extractor/tf1.py b/haruhi_dl/extractor/tf1.py similarity index 100% rename from youtube_dl/extractor/tf1.py rename to haruhi_dl/extractor/tf1.py diff --git a/youtube_dl/extractor/tfo.py b/haruhi_dl/extractor/tfo.py similarity index 100% rename from youtube_dl/extractor/tfo.py rename to haruhi_dl/extractor/tfo.py diff --git a/youtube_dl/extractor/theintercept.py b/haruhi_dl/extractor/theintercept.py similarity index 100% rename from youtube_dl/extractor/theintercept.py rename to haruhi_dl/extractor/theintercept.py diff --git a/youtube_dl/extractor/theplatform.py b/haruhi_dl/extractor/theplatform.py similarity index 99% rename from youtube_dl/extractor/theplatform.py rename to haruhi_dl/extractor/theplatform.py index 07055513a..472238010 100644 --- a/youtube_dl/extractor/theplatform.py +++ b/haruhi_dl/extractor/theplatform.py @@ -209,7 +209,7 @@ class ThePlatformIE(ThePlatformBaseIE, AdobePassIE): return [m.group('url')] # Are whitesapces ignored in URLs? - # https://github.com/ytdl-org/youtube-dl/issues/12044 + # https://github.com/ytdl-org/haruhi-dl/issues/12044 matches = re.findall( r'(?s)<(?:iframe|script)[^>]+src=(["\'])((?:https?:)?//player\.theplatform\.com/p/.+?)\1', webpage) if matches: @@ -271,7 +271,7 @@ class ThePlatformIE(ThePlatformBaseIE, AdobePassIE): if smuggled_data.get('force_smil_url', False): smil_url = url - # Explicitly specified SMIL (see https://github.com/ytdl-org/youtube-dl/issues/7385) + # Explicitly specified SMIL (see https://github.com/ytdl-org/haruhi-dl/issues/7385) elif '/guid/' in url: headers = {} source_url = smuggled_data.get('source_url') diff --git a/youtube_dl/extractor/thescene.py b/haruhi_dl/extractor/thescene.py similarity index 100% rename from youtube_dl/extractor/thescene.py rename to haruhi_dl/extractor/thescene.py diff --git a/youtube_dl/extractor/thestar.py b/haruhi_dl/extractor/thestar.py similarity index 100% rename from youtube_dl/extractor/thestar.py rename to haruhi_dl/extractor/thestar.py diff --git a/youtube_dl/extractor/thesun.py b/haruhi_dl/extractor/thesun.py similarity index 100% rename from youtube_dl/extractor/thesun.py rename to haruhi_dl/extractor/thesun.py diff --git a/youtube_dl/extractor/theweatherchannel.py b/haruhi_dl/extractor/theweatherchannel.py similarity index 100% rename from youtube_dl/extractor/theweatherchannel.py rename to haruhi_dl/extractor/theweatherchannel.py diff --git a/youtube_dl/extractor/thisamericanlife.py b/haruhi_dl/extractor/thisamericanlife.py similarity index 100% rename from youtube_dl/extractor/thisamericanlife.py rename to haruhi_dl/extractor/thisamericanlife.py diff --git a/youtube_dl/extractor/thisav.py b/haruhi_dl/extractor/thisav.py similarity index 100% rename from youtube_dl/extractor/thisav.py rename to haruhi_dl/extractor/thisav.py diff --git a/youtube_dl/extractor/thisoldhouse.py b/haruhi_dl/extractor/thisoldhouse.py similarity index 100% rename from youtube_dl/extractor/thisoldhouse.py rename to haruhi_dl/extractor/thisoldhouse.py diff --git a/youtube_dl/extractor/threeqsdn.py b/haruhi_dl/extractor/threeqsdn.py similarity index 100% rename from youtube_dl/extractor/threeqsdn.py rename to haruhi_dl/extractor/threeqsdn.py diff --git a/youtube_dl/extractor/tiktok.py b/haruhi_dl/extractor/tiktok.py similarity index 100% rename from youtube_dl/extractor/tiktok.py rename to haruhi_dl/extractor/tiktok.py diff --git a/youtube_dl/extractor/tinypic.py b/haruhi_dl/extractor/tinypic.py similarity index 100% rename from youtube_dl/extractor/tinypic.py rename to haruhi_dl/extractor/tinypic.py diff --git a/youtube_dl/extractor/tmz.py b/haruhi_dl/extractor/tmz.py similarity index 100% rename from youtube_dl/extractor/tmz.py rename to haruhi_dl/extractor/tmz.py diff --git a/youtube_dl/extractor/tnaflix.py b/haruhi_dl/extractor/tnaflix.py similarity index 100% rename from youtube_dl/extractor/tnaflix.py rename to haruhi_dl/extractor/tnaflix.py diff --git a/youtube_dl/extractor/toggle.py b/haruhi_dl/extractor/toggle.py similarity index 100% rename from youtube_dl/extractor/toggle.py rename to haruhi_dl/extractor/toggle.py diff --git a/youtube_dl/extractor/tonline.py b/haruhi_dl/extractor/tonline.py similarity index 100% rename from youtube_dl/extractor/tonline.py rename to haruhi_dl/extractor/tonline.py diff --git a/youtube_dl/extractor/toongoggles.py b/haruhi_dl/extractor/toongoggles.py similarity index 100% rename from youtube_dl/extractor/toongoggles.py rename to haruhi_dl/extractor/toongoggles.py diff --git a/youtube_dl/extractor/toutv.py b/haruhi_dl/extractor/toutv.py similarity index 98% rename from youtube_dl/extractor/toutv.py rename to haruhi_dl/extractor/toutv.py index 44b022fca..d2dc25957 100644 --- a/youtube_dl/extractor/toutv.py +++ b/haruhi_dl/extractor/toutv.py @@ -73,7 +73,7 @@ class TouTvIE(RadioCanadaIE): 'version': 4, }) # IsDrm does not necessarily mean the video is DRM protected (see - # https://github.com/ytdl-org/youtube-dl/issues/13994). + # https://github.com/ytdl-org/haruhi-dl/issues/13994). if metadata.get('IsDrm'): self.report_warning('This video is probably DRM protected.', path) video_id = metadata['IdMedia'] diff --git a/youtube_dl/extractor/toypics.py b/haruhi_dl/extractor/toypics.py similarity index 100% rename from youtube_dl/extractor/toypics.py rename to haruhi_dl/extractor/toypics.py diff --git a/youtube_dl/extractor/traileraddict.py b/haruhi_dl/extractor/traileraddict.py similarity index 100% rename from youtube_dl/extractor/traileraddict.py rename to haruhi_dl/extractor/traileraddict.py diff --git a/youtube_dl/extractor/trilulilu.py b/haruhi_dl/extractor/trilulilu.py similarity index 100% rename from youtube_dl/extractor/trilulilu.py rename to haruhi_dl/extractor/trilulilu.py diff --git a/youtube_dl/extractor/trunews.py b/haruhi_dl/extractor/trunews.py similarity index 100% rename from youtube_dl/extractor/trunews.py rename to haruhi_dl/extractor/trunews.py diff --git a/youtube_dl/extractor/trutv.py b/haruhi_dl/extractor/trutv.py similarity index 100% rename from youtube_dl/extractor/trutv.py rename to haruhi_dl/extractor/trutv.py diff --git a/youtube_dl/extractor/tube8.py b/haruhi_dl/extractor/tube8.py similarity index 100% rename from youtube_dl/extractor/tube8.py rename to haruhi_dl/extractor/tube8.py diff --git a/youtube_dl/extractor/tubitv.py b/haruhi_dl/extractor/tubitv.py similarity index 100% rename from youtube_dl/extractor/tubitv.py rename to haruhi_dl/extractor/tubitv.py diff --git a/youtube_dl/extractor/tudou.py b/haruhi_dl/extractor/tudou.py similarity index 100% rename from youtube_dl/extractor/tudou.py rename to haruhi_dl/extractor/tudou.py diff --git a/youtube_dl/extractor/tumblr.py b/haruhi_dl/extractor/tumblr.py similarity index 100% rename from youtube_dl/extractor/tumblr.py rename to haruhi_dl/extractor/tumblr.py diff --git a/youtube_dl/extractor/tunein.py b/haruhi_dl/extractor/tunein.py similarity index 100% rename from youtube_dl/extractor/tunein.py rename to haruhi_dl/extractor/tunein.py diff --git a/youtube_dl/extractor/tunepk.py b/haruhi_dl/extractor/tunepk.py similarity index 100% rename from youtube_dl/extractor/tunepk.py rename to haruhi_dl/extractor/tunepk.py diff --git a/youtube_dl/extractor/turbo.py b/haruhi_dl/extractor/turbo.py similarity index 100% rename from youtube_dl/extractor/turbo.py rename to haruhi_dl/extractor/turbo.py diff --git a/youtube_dl/extractor/turner.py b/haruhi_dl/extractor/turner.py similarity index 100% rename from youtube_dl/extractor/turner.py rename to haruhi_dl/extractor/turner.py diff --git a/youtube_dl/extractor/tv2.py b/haruhi_dl/extractor/tv2.py similarity index 100% rename from youtube_dl/extractor/tv2.py rename to haruhi_dl/extractor/tv2.py diff --git a/youtube_dl/extractor/tv2dk.py b/haruhi_dl/extractor/tv2dk.py similarity index 100% rename from youtube_dl/extractor/tv2dk.py rename to haruhi_dl/extractor/tv2dk.py diff --git a/youtube_dl/extractor/tv2hu.py b/haruhi_dl/extractor/tv2hu.py similarity index 100% rename from youtube_dl/extractor/tv2hu.py rename to haruhi_dl/extractor/tv2hu.py diff --git a/youtube_dl/extractor/tv4.py b/haruhi_dl/extractor/tv4.py similarity index 100% rename from youtube_dl/extractor/tv4.py rename to haruhi_dl/extractor/tv4.py diff --git a/youtube_dl/extractor/tv5mondeplus.py b/haruhi_dl/extractor/tv5mondeplus.py similarity index 100% rename from youtube_dl/extractor/tv5mondeplus.py rename to haruhi_dl/extractor/tv5mondeplus.py diff --git a/youtube_dl/extractor/tva.py b/haruhi_dl/extractor/tva.py similarity index 100% rename from youtube_dl/extractor/tva.py rename to haruhi_dl/extractor/tva.py diff --git a/youtube_dl/extractor/tvanouvelles.py b/haruhi_dl/extractor/tvanouvelles.py similarity index 100% rename from youtube_dl/extractor/tvanouvelles.py rename to haruhi_dl/extractor/tvanouvelles.py diff --git a/youtube_dl/extractor/tvc.py b/haruhi_dl/extractor/tvc.py similarity index 100% rename from youtube_dl/extractor/tvc.py rename to haruhi_dl/extractor/tvc.py diff --git a/youtube_dl/extractor/tvigle.py b/haruhi_dl/extractor/tvigle.py similarity index 100% rename from youtube_dl/extractor/tvigle.py rename to haruhi_dl/extractor/tvigle.py diff --git a/youtube_dl/extractor/tvland.py b/haruhi_dl/extractor/tvland.py similarity index 100% rename from youtube_dl/extractor/tvland.py rename to haruhi_dl/extractor/tvland.py diff --git a/youtube_dl/extractor/tvn24.py b/haruhi_dl/extractor/tvn24.py similarity index 100% rename from youtube_dl/extractor/tvn24.py rename to haruhi_dl/extractor/tvn24.py diff --git a/youtube_dl/extractor/tvnet.py b/haruhi_dl/extractor/tvnet.py similarity index 100% rename from youtube_dl/extractor/tvnet.py rename to haruhi_dl/extractor/tvnet.py diff --git a/youtube_dl/extractor/tvnoe.py b/haruhi_dl/extractor/tvnoe.py similarity index 100% rename from youtube_dl/extractor/tvnoe.py rename to haruhi_dl/extractor/tvnoe.py diff --git a/youtube_dl/extractor/tvnow.py b/haruhi_dl/extractor/tvnow.py similarity index 100% rename from youtube_dl/extractor/tvnow.py rename to haruhi_dl/extractor/tvnow.py diff --git a/youtube_dl/extractor/tvp.py b/haruhi_dl/extractor/tvp.py similarity index 100% rename from youtube_dl/extractor/tvp.py rename to haruhi_dl/extractor/tvp.py diff --git a/youtube_dl/extractor/tvplay.py b/haruhi_dl/extractor/tvplay.py similarity index 100% rename from youtube_dl/extractor/tvplay.py rename to haruhi_dl/extractor/tvplay.py diff --git a/youtube_dl/extractor/tvplayer.py b/haruhi_dl/extractor/tvplayer.py similarity index 100% rename from youtube_dl/extractor/tvplayer.py rename to haruhi_dl/extractor/tvplayer.py diff --git a/youtube_dl/extractor/tweakers.py b/haruhi_dl/extractor/tweakers.py similarity index 100% rename from youtube_dl/extractor/tweakers.py rename to haruhi_dl/extractor/tweakers.py diff --git a/youtube_dl/extractor/twentyfourvideo.py b/haruhi_dl/extractor/twentyfourvideo.py similarity index 100% rename from youtube_dl/extractor/twentyfourvideo.py rename to haruhi_dl/extractor/twentyfourvideo.py diff --git a/youtube_dl/extractor/twentymin.py b/haruhi_dl/extractor/twentymin.py similarity index 100% rename from youtube_dl/extractor/twentymin.py rename to haruhi_dl/extractor/twentymin.py diff --git a/youtube_dl/extractor/twentythreevideo.py b/haruhi_dl/extractor/twentythreevideo.py similarity index 100% rename from youtube_dl/extractor/twentythreevideo.py rename to haruhi_dl/extractor/twentythreevideo.py diff --git a/youtube_dl/extractor/twitcasting.py b/haruhi_dl/extractor/twitcasting.py similarity index 100% rename from youtube_dl/extractor/twitcasting.py rename to haruhi_dl/extractor/twitcasting.py diff --git a/youtube_dl/extractor/twitch.py b/haruhi_dl/extractor/twitch.py similarity index 100% rename from youtube_dl/extractor/twitch.py rename to haruhi_dl/extractor/twitch.py diff --git a/youtube_dl/extractor/twitter.py b/haruhi_dl/extractor/twitter.py similarity index 100% rename from youtube_dl/extractor/twitter.py rename to haruhi_dl/extractor/twitter.py diff --git a/youtube_dl/extractor/udemy.py b/haruhi_dl/extractor/udemy.py similarity index 99% rename from youtube_dl/extractor/udemy.py rename to haruhi_dl/extractor/udemy.py index 2a4faecef..f9e115e6a 100644 --- a/youtube_dl/extractor/udemy.py +++ b/haruhi_dl/extractor/udemy.py @@ -143,7 +143,7 @@ class UdemyIE(InfoExtractor): raise ExtractorError( 'Udemy asks you to solve a CAPTCHA. Login with browser, ' 'solve CAPTCHA, then export cookies and pass cookie file to ' - 'youtube-dl with --cookies.', expected=True) + 'haruhi-dl with --cookies.', expected=True) return ret def _download_json(self, url_or_request, *args, **kwargs): @@ -378,7 +378,7 @@ class UdemyIE(InfoExtractor): }, res)) # react rendition since 2017.04.15 (see - # https://github.com/ytdl-org/youtube-dl/issues/12744) + # https://github.com/ytdl-org/haruhi-dl/issues/12744) data = self._parse_json( self._search_regex( r'videojs-setup-data=(["\'])(?P<data>{.+?})\1', view_html, diff --git a/youtube_dl/extractor/udn.py b/haruhi_dl/extractor/udn.py similarity index 97% rename from youtube_dl/extractor/udn.py rename to haruhi_dl/extractor/udn.py index 2c8e5c7b4..d5242457d 100644 --- a/youtube_dl/extractor/udn.py +++ b/haruhi_dl/extractor/udn.py @@ -82,7 +82,7 @@ class UDNEmbedIE(InfoExtractor): mobj = re.search(r'_(?P<height>\d+)p_(?P<tbr>\d+)\.mp4', video_url) a_format = { 'url': video_url, - # video_type may be 'mp4', which confuses YoutubeDL + # video_type may be 'mp4', which confuses HaruhiDL 'format_id': 'http-' + video_type, } if mobj: diff --git a/youtube_dl/extractor/ufctv.py b/haruhi_dl/extractor/ufctv.py similarity index 100% rename from youtube_dl/extractor/ufctv.py rename to haruhi_dl/extractor/ufctv.py diff --git a/youtube_dl/extractor/uktvplay.py b/haruhi_dl/extractor/uktvplay.py similarity index 100% rename from youtube_dl/extractor/uktvplay.py rename to haruhi_dl/extractor/uktvplay.py diff --git a/youtube_dl/extractor/umg.py b/haruhi_dl/extractor/umg.py similarity index 100% rename from youtube_dl/extractor/umg.py rename to haruhi_dl/extractor/umg.py diff --git a/youtube_dl/extractor/unistra.py b/haruhi_dl/extractor/unistra.py similarity index 100% rename from youtube_dl/extractor/unistra.py rename to haruhi_dl/extractor/unistra.py diff --git a/youtube_dl/extractor/unity.py b/haruhi_dl/extractor/unity.py similarity index 100% rename from youtube_dl/extractor/unity.py rename to haruhi_dl/extractor/unity.py diff --git a/youtube_dl/extractor/uol.py b/haruhi_dl/extractor/uol.py similarity index 100% rename from youtube_dl/extractor/uol.py rename to haruhi_dl/extractor/uol.py diff --git a/youtube_dl/extractor/uplynk.py b/haruhi_dl/extractor/uplynk.py similarity index 100% rename from youtube_dl/extractor/uplynk.py rename to haruhi_dl/extractor/uplynk.py diff --git a/youtube_dl/extractor/urort.py b/haruhi_dl/extractor/urort.py similarity index 100% rename from youtube_dl/extractor/urort.py rename to haruhi_dl/extractor/urort.py diff --git a/youtube_dl/extractor/urplay.py b/haruhi_dl/extractor/urplay.py similarity index 100% rename from youtube_dl/extractor/urplay.py rename to haruhi_dl/extractor/urplay.py diff --git a/youtube_dl/extractor/usanetwork.py b/haruhi_dl/extractor/usanetwork.py similarity index 100% rename from youtube_dl/extractor/usanetwork.py rename to haruhi_dl/extractor/usanetwork.py diff --git a/youtube_dl/extractor/usatoday.py b/haruhi_dl/extractor/usatoday.py similarity index 100% rename from youtube_dl/extractor/usatoday.py rename to haruhi_dl/extractor/usatoday.py diff --git a/youtube_dl/extractor/ustream.py b/haruhi_dl/extractor/ustream.py similarity index 99% rename from youtube_dl/extractor/ustream.py rename to haruhi_dl/extractor/ustream.py index 9e860aeb7..49c9a7c34 100644 --- a/youtube_dl/extractor/ustream.py +++ b/haruhi_dl/extractor/ustream.py @@ -168,7 +168,7 @@ class UstreamIE(InfoExtractor): m = re.match(self._VALID_URL, url) video_id = m.group('id') - # some sites use this embed format (see: https://github.com/ytdl-org/youtube-dl/issues/2990) + # some sites use this embed format (see: https://github.com/ytdl-org/haruhi-dl/issues/2990) if m.group('type') == 'embed/recorded': video_id = m.group('id') desktop_url = 'http://www.ustream.tv/recorded/' + video_id diff --git a/youtube_dl/extractor/ustudio.py b/haruhi_dl/extractor/ustudio.py similarity index 100% rename from youtube_dl/extractor/ustudio.py rename to haruhi_dl/extractor/ustudio.py diff --git a/youtube_dl/extractor/varzesh3.py b/haruhi_dl/extractor/varzesh3.py similarity index 100% rename from youtube_dl/extractor/varzesh3.py rename to haruhi_dl/extractor/varzesh3.py diff --git a/youtube_dl/extractor/vbox7.py b/haruhi_dl/extractor/vbox7.py similarity index 100% rename from youtube_dl/extractor/vbox7.py rename to haruhi_dl/extractor/vbox7.py diff --git a/youtube_dl/extractor/veehd.py b/haruhi_dl/extractor/veehd.py similarity index 98% rename from youtube_dl/extractor/veehd.py rename to haruhi_dl/extractor/veehd.py index a6dc3c8d8..8bb03380d 100644 --- a/youtube_dl/extractor/veehd.py +++ b/haruhi_dl/extractor/veehd.py @@ -54,7 +54,7 @@ class VeeHDIE(InfoExtractor): video_id = self._match_id(url) # VeeHD seems to send garbage on the first request. - # See https://github.com/ytdl-org/youtube-dl/issues/2102 + # See https://github.com/ytdl-org/haruhi-dl/issues/2102 self._download_webpage(url, video_id, 'Requesting webpage') webpage = self._download_webpage(url, video_id) diff --git a/youtube_dl/extractor/veoh.py b/haruhi_dl/extractor/veoh.py similarity index 100% rename from youtube_dl/extractor/veoh.py rename to haruhi_dl/extractor/veoh.py diff --git a/youtube_dl/extractor/vesti.py b/haruhi_dl/extractor/vesti.py similarity index 100% rename from youtube_dl/extractor/vesti.py rename to haruhi_dl/extractor/vesti.py diff --git a/youtube_dl/extractor/vevo.py b/haruhi_dl/extractor/vevo.py similarity index 99% rename from youtube_dl/extractor/vevo.py rename to haruhi_dl/extractor/vevo.py index 4ea9f1b4b..ffd42f9ea 100644 --- a/youtube_dl/extractor/vevo.py +++ b/haruhi_dl/extractor/vevo.py @@ -204,7 +204,7 @@ class VevoIE(VevoBaseIE): fatal=False) # Some videos are only available via webpage (e.g. - # https://github.com/ytdl-org/youtube-dl/issues/9366) + # https://github.com/ytdl-org/haruhi-dl/issues/9366) if not video_versions: webpage = self._download_webpage(url, video_id) json_data = self._extract_json(webpage, video_id) diff --git a/youtube_dl/extractor/vgtv.py b/haruhi_dl/extractor/vgtv.py similarity index 100% rename from youtube_dl/extractor/vgtv.py rename to haruhi_dl/extractor/vgtv.py diff --git a/youtube_dl/extractor/vh1.py b/haruhi_dl/extractor/vh1.py similarity index 100% rename from youtube_dl/extractor/vh1.py rename to haruhi_dl/extractor/vh1.py diff --git a/youtube_dl/extractor/vice.py b/haruhi_dl/extractor/vice.py similarity index 100% rename from youtube_dl/extractor/vice.py rename to haruhi_dl/extractor/vice.py diff --git a/youtube_dl/extractor/vidbit.py b/haruhi_dl/extractor/vidbit.py similarity index 100% rename from youtube_dl/extractor/vidbit.py rename to haruhi_dl/extractor/vidbit.py diff --git a/youtube_dl/extractor/viddler.py b/haruhi_dl/extractor/viddler.py similarity index 100% rename from youtube_dl/extractor/viddler.py rename to haruhi_dl/extractor/viddler.py diff --git a/youtube_dl/extractor/videa.py b/haruhi_dl/extractor/videa.py similarity index 100% rename from youtube_dl/extractor/videa.py rename to haruhi_dl/extractor/videa.py diff --git a/youtube_dl/extractor/videodetective.py b/haruhi_dl/extractor/videodetective.py similarity index 100% rename from youtube_dl/extractor/videodetective.py rename to haruhi_dl/extractor/videodetective.py diff --git a/youtube_dl/extractor/videofyme.py b/haruhi_dl/extractor/videofyme.py similarity index 100% rename from youtube_dl/extractor/videofyme.py rename to haruhi_dl/extractor/videofyme.py diff --git a/youtube_dl/extractor/videomore.py b/haruhi_dl/extractor/videomore.py similarity index 100% rename from youtube_dl/extractor/videomore.py rename to haruhi_dl/extractor/videomore.py diff --git a/youtube_dl/extractor/videopress.py b/haruhi_dl/extractor/videopress.py similarity index 100% rename from youtube_dl/extractor/videopress.py rename to haruhi_dl/extractor/videopress.py diff --git a/youtube_dl/extractor/vidio.py b/haruhi_dl/extractor/vidio.py similarity index 100% rename from youtube_dl/extractor/vidio.py rename to haruhi_dl/extractor/vidio.py diff --git a/youtube_dl/extractor/vidlii.py b/haruhi_dl/extractor/vidlii.py similarity index 100% rename from youtube_dl/extractor/vidlii.py rename to haruhi_dl/extractor/vidlii.py diff --git a/youtube_dl/extractor/vidme.py b/haruhi_dl/extractor/vidme.py similarity index 100% rename from youtube_dl/extractor/vidme.py rename to haruhi_dl/extractor/vidme.py diff --git a/youtube_dl/extractor/vidzi.py b/haruhi_dl/extractor/vidzi.py similarity index 96% rename from youtube_dl/extractor/vidzi.py rename to haruhi_dl/extractor/vidzi.py index 42ea4952c..b95eaadc0 100644 --- a/youtube_dl/extractor/vidzi.py +++ b/haruhi_dl/extractor/vidzi.py @@ -20,7 +20,7 @@ class VidziIE(InfoExtractor): 'info_dict': { 'id': 'cghql9yq6emu', 'ext': 'mp4', - 'title': 'youtube-dl test video 1\\\\2\'3/4<5\\\\6ä7↭', + 'title': 'haruhi-dl test video 1\\\\2\'3/4<5\\\\6ä7↭', }, 'params': { # m3u8 download diff --git a/youtube_dl/extractor/vier.py b/haruhi_dl/extractor/vier.py similarity index 100% rename from youtube_dl/extractor/vier.py rename to haruhi_dl/extractor/vier.py diff --git a/youtube_dl/extractor/viewlift.py b/haruhi_dl/extractor/viewlift.py similarity index 100% rename from youtube_dl/extractor/viewlift.py rename to haruhi_dl/extractor/viewlift.py diff --git a/youtube_dl/extractor/viidea.py b/haruhi_dl/extractor/viidea.py similarity index 100% rename from youtube_dl/extractor/viidea.py rename to haruhi_dl/extractor/viidea.py diff --git a/youtube_dl/extractor/viki.py b/haruhi_dl/extractor/viki.py similarity index 100% rename from youtube_dl/extractor/viki.py rename to haruhi_dl/extractor/viki.py diff --git a/youtube_dl/extractor/vimeo.py b/haruhi_dl/extractor/vimeo.py similarity index 98% rename from youtube_dl/extractor/vimeo.py rename to haruhi_dl/extractor/vimeo.py index 421795b94..da4f08704 100644 --- a/youtube_dl/extractor/vimeo.py +++ b/haruhi_dl/extractor/vimeo.py @@ -287,7 +287,7 @@ class VimeoIE(VimeoBaseInfoExtractor): 'info_dict': { 'id': '56015672', 'ext': 'mp4', - 'title': "youtube-dl test video - \u2605 \" ' \u5e78 / \\ \u00e4 \u21ad \U0001d550", + 'title': "haruhi-dl test video - \u2605 \" ' \u5e78 / \\ \u00e4 \u21ad \U0001d550", 'description': 'md5:2d3305bad981a06ff79f027f19865021', 'timestamp': 1355990239, 'upload_date': '20121220', @@ -347,7 +347,7 @@ class VimeoIE(VimeoBaseInfoExtractor): 'info_dict': { 'id': '68375962', 'ext': 'mp4', - 'title': 'youtube-dl password protected test video', + 'title': 'haruhi-dl password protected test video', 'timestamp': 1371200155, 'upload_date': '20130614', 'uploader_url': r're:https?://(?:www\.)?vimeo\.com/user18948128', @@ -358,7 +358,7 @@ class VimeoIE(VimeoBaseInfoExtractor): }, 'params': { 'format': 'best[protocol=https]', - 'videopassword': 'youtube-dl', + 'videopassword': 'haruhi-dl', }, }, { @@ -473,7 +473,7 @@ class VimeoIE(VimeoBaseInfoExtractor): 'info_dict': { 'id': '68375962', 'ext': 'mp4', - 'title': 'youtube-dl password protected test video', + 'title': 'haruhi-dl password protected test video', 'uploader_url': r're:https?://(?:www\.)?vimeo\.com/user18948128', 'uploader_id': 'user18948128', 'uploader': 'Jaime Marquínez Ferrándiz', @@ -481,7 +481,7 @@ class VimeoIE(VimeoBaseInfoExtractor): }, 'params': { 'format': 'best[protocol=https]', - 'videopassword': 'youtube-dl', + 'videopassword': 'haruhi-dl', }, }, { @@ -580,7 +580,7 @@ class VimeoIE(VimeoBaseInfoExtractor): is_player = '://player.vimeo.com/video/' in url if is_pro: # some videos require portfolio_id to be present in player url - # https://github.com/ytdl-org/youtube-dl/issues/20070 + # https://github.com/ytdl-org/haruhi-dl/issues/20070 url = self._extract_url(url, self._download_webpage(url, video_id)) if not url: url = 'https://vimeo.com/' + video_id @@ -600,7 +600,7 @@ class VimeoIE(VimeoBaseInfoExtractor): if b'Because of its privacy settings, this video cannot be played here' in errmsg: raise ExtractorError( 'Cannot download embed-only video without embedding ' - 'URL. Please call youtube-dl with the URL of the page ' + 'URL. Please call haruhi-dl with the URL of the page ' 'that embeds this video.', expected=True) raise @@ -631,7 +631,7 @@ class VimeoIE(VimeoBaseInfoExtractor): if not config_url: # Sometimes new react-based page is served instead of old one that require # different config URL extraction approach (see - # https://github.com/ytdl-org/youtube-dl/pull/7209) + # https://github.com/ytdl-org/haruhi-dl/pull/7209) page_config = self._parse_json(self._search_regex( r'vimeo\.(?:clip|vod_title)_page_config\s*=\s*({.+?});', webpage, 'page config'), video_id) @@ -917,7 +917,7 @@ class VimeoAlbumIE(VimeoBaseInfoExtractor): }, 'playlist_count': 1, 'params': { - 'videopassword': 'youtube-dl', + 'videopassword': 'haruhi-dl', } }] _PAGE_SIZE = 100 diff --git a/youtube_dl/extractor/vimple.py b/haruhi_dl/extractor/vimple.py similarity index 100% rename from youtube_dl/extractor/vimple.py rename to haruhi_dl/extractor/vimple.py diff --git a/youtube_dl/extractor/vine.py b/haruhi_dl/extractor/vine.py similarity index 100% rename from youtube_dl/extractor/vine.py rename to haruhi_dl/extractor/vine.py diff --git a/youtube_dl/extractor/viqeo.py b/haruhi_dl/extractor/viqeo.py similarity index 100% rename from youtube_dl/extractor/viqeo.py rename to haruhi_dl/extractor/viqeo.py diff --git a/youtube_dl/extractor/viu.py b/haruhi_dl/extractor/viu.py similarity index 100% rename from youtube_dl/extractor/viu.py rename to haruhi_dl/extractor/viu.py diff --git a/youtube_dl/extractor/vk.py b/haruhi_dl/extractor/vk.py similarity index 100% rename from youtube_dl/extractor/vk.py rename to haruhi_dl/extractor/vk.py diff --git a/youtube_dl/extractor/vlive.py b/haruhi_dl/extractor/vlive.py similarity index 99% rename from youtube_dl/extractor/vlive.py rename to haruhi_dl/extractor/vlive.py index f79531e6f..0c3f98752 100644 --- a/youtube_dl/extractor/vlive.py +++ b/haruhi_dl/extractor/vlive.py @@ -258,7 +258,7 @@ class VLiveChannelIE(InfoExtractor): # Large values of maxNumOfRows (~300 or above) may cause # empty responses (see [1]), e.g. this happens for [2] that # has more than 300 videos. - # 1. https://github.com/ytdl-org/youtube-dl/issues/13830 + # 1. https://github.com/ytdl-org/haruhi-dl/issues/13830 # 2. http://channels.vlive.tv/EDBF. 'maxNumOfRows': 100, '_': int(time.time()), diff --git a/youtube_dl/extractor/vodlocker.py b/haruhi_dl/extractor/vodlocker.py similarity index 100% rename from youtube_dl/extractor/vodlocker.py rename to haruhi_dl/extractor/vodlocker.py diff --git a/youtube_dl/extractor/vodpl.py b/haruhi_dl/extractor/vodpl.py similarity index 100% rename from youtube_dl/extractor/vodpl.py rename to haruhi_dl/extractor/vodpl.py diff --git a/youtube_dl/extractor/vodplatform.py b/haruhi_dl/extractor/vodplatform.py similarity index 100% rename from youtube_dl/extractor/vodplatform.py rename to haruhi_dl/extractor/vodplatform.py diff --git a/youtube_dl/extractor/voicerepublic.py b/haruhi_dl/extractor/voicerepublic.py similarity index 100% rename from youtube_dl/extractor/voicerepublic.py rename to haruhi_dl/extractor/voicerepublic.py diff --git a/youtube_dl/extractor/voot.py b/haruhi_dl/extractor/voot.py similarity index 100% rename from youtube_dl/extractor/voot.py rename to haruhi_dl/extractor/voot.py diff --git a/youtube_dl/extractor/voxmedia.py b/haruhi_dl/extractor/voxmedia.py similarity index 100% rename from youtube_dl/extractor/voxmedia.py rename to haruhi_dl/extractor/voxmedia.py diff --git a/youtube_dl/extractor/vrak.py b/haruhi_dl/extractor/vrak.py similarity index 100% rename from youtube_dl/extractor/vrak.py rename to haruhi_dl/extractor/vrak.py diff --git a/youtube_dl/extractor/vrt.py b/haruhi_dl/extractor/vrt.py similarity index 100% rename from youtube_dl/extractor/vrt.py rename to haruhi_dl/extractor/vrt.py diff --git a/youtube_dl/extractor/vrv.py b/haruhi_dl/extractor/vrv.py similarity index 100% rename from youtube_dl/extractor/vrv.py rename to haruhi_dl/extractor/vrv.py diff --git a/youtube_dl/extractor/vshare.py b/haruhi_dl/extractor/vshare.py similarity index 100% rename from youtube_dl/extractor/vshare.py rename to haruhi_dl/extractor/vshare.py diff --git a/youtube_dl/extractor/vube.py b/haruhi_dl/extractor/vube.py similarity index 100% rename from youtube_dl/extractor/vube.py rename to haruhi_dl/extractor/vube.py diff --git a/youtube_dl/extractor/vuclip.py b/haruhi_dl/extractor/vuclip.py similarity index 100% rename from youtube_dl/extractor/vuclip.py rename to haruhi_dl/extractor/vuclip.py diff --git a/youtube_dl/extractor/vvvvid.py b/haruhi_dl/extractor/vvvvid.py similarity index 100% rename from youtube_dl/extractor/vvvvid.py rename to haruhi_dl/extractor/vvvvid.py diff --git a/youtube_dl/extractor/vyborymos.py b/haruhi_dl/extractor/vyborymos.py similarity index 100% rename from youtube_dl/extractor/vyborymos.py rename to haruhi_dl/extractor/vyborymos.py diff --git a/youtube_dl/extractor/vzaar.py b/haruhi_dl/extractor/vzaar.py similarity index 100% rename from youtube_dl/extractor/vzaar.py rename to haruhi_dl/extractor/vzaar.py diff --git a/youtube_dl/extractor/wakanim.py b/haruhi_dl/extractor/wakanim.py similarity index 100% rename from youtube_dl/extractor/wakanim.py rename to haruhi_dl/extractor/wakanim.py diff --git a/youtube_dl/extractor/walla.py b/haruhi_dl/extractor/walla.py similarity index 100% rename from youtube_dl/extractor/walla.py rename to haruhi_dl/extractor/walla.py diff --git a/youtube_dl/extractor/washingtonpost.py b/haruhi_dl/extractor/washingtonpost.py similarity index 100% rename from youtube_dl/extractor/washingtonpost.py rename to haruhi_dl/extractor/washingtonpost.py diff --git a/youtube_dl/extractor/wat.py b/haruhi_dl/extractor/wat.py similarity index 100% rename from youtube_dl/extractor/wat.py rename to haruhi_dl/extractor/wat.py diff --git a/youtube_dl/extractor/watchbox.py b/haruhi_dl/extractor/watchbox.py similarity index 100% rename from youtube_dl/extractor/watchbox.py rename to haruhi_dl/extractor/watchbox.py diff --git a/youtube_dl/extractor/watchindianporn.py b/haruhi_dl/extractor/watchindianporn.py similarity index 100% rename from youtube_dl/extractor/watchindianporn.py rename to haruhi_dl/extractor/watchindianporn.py diff --git a/youtube_dl/extractor/wdr.py b/haruhi_dl/extractor/wdr.py similarity index 100% rename from youtube_dl/extractor/wdr.py rename to haruhi_dl/extractor/wdr.py diff --git a/youtube_dl/extractor/webcaster.py b/haruhi_dl/extractor/webcaster.py similarity index 100% rename from youtube_dl/extractor/webcaster.py rename to haruhi_dl/extractor/webcaster.py diff --git a/youtube_dl/extractor/webofstories.py b/haruhi_dl/extractor/webofstories.py similarity index 100% rename from youtube_dl/extractor/webofstories.py rename to haruhi_dl/extractor/webofstories.py diff --git a/youtube_dl/extractor/weibo.py b/haruhi_dl/extractor/weibo.py similarity index 100% rename from youtube_dl/extractor/weibo.py rename to haruhi_dl/extractor/weibo.py diff --git a/youtube_dl/extractor/weiqitv.py b/haruhi_dl/extractor/weiqitv.py similarity index 100% rename from youtube_dl/extractor/weiqitv.py rename to haruhi_dl/extractor/weiqitv.py diff --git a/youtube_dl/extractor/wistia.py b/haruhi_dl/extractor/wistia.py similarity index 100% rename from youtube_dl/extractor/wistia.py rename to haruhi_dl/extractor/wistia.py diff --git a/youtube_dl/extractor/worldstarhiphop.py b/haruhi_dl/extractor/worldstarhiphop.py similarity index 100% rename from youtube_dl/extractor/worldstarhiphop.py rename to haruhi_dl/extractor/worldstarhiphop.py diff --git a/youtube_dl/extractor/wsj.py b/haruhi_dl/extractor/wsj.py similarity index 100% rename from youtube_dl/extractor/wsj.py rename to haruhi_dl/extractor/wsj.py diff --git a/youtube_dl/extractor/wwe.py b/haruhi_dl/extractor/wwe.py similarity index 100% rename from youtube_dl/extractor/wwe.py rename to haruhi_dl/extractor/wwe.py diff --git a/youtube_dl/extractor/xbef.py b/haruhi_dl/extractor/xbef.py similarity index 100% rename from youtube_dl/extractor/xbef.py rename to haruhi_dl/extractor/xbef.py diff --git a/youtube_dl/extractor/xboxclips.py b/haruhi_dl/extractor/xboxclips.py similarity index 100% rename from youtube_dl/extractor/xboxclips.py rename to haruhi_dl/extractor/xboxclips.py diff --git a/youtube_dl/extractor/xfileshare.py b/haruhi_dl/extractor/xfileshare.py similarity index 100% rename from youtube_dl/extractor/xfileshare.py rename to haruhi_dl/extractor/xfileshare.py diff --git a/youtube_dl/extractor/xhamster.py b/haruhi_dl/extractor/xhamster.py similarity index 100% rename from youtube_dl/extractor/xhamster.py rename to haruhi_dl/extractor/xhamster.py diff --git a/youtube_dl/extractor/xiami.py b/haruhi_dl/extractor/xiami.py similarity index 100% rename from youtube_dl/extractor/xiami.py rename to haruhi_dl/extractor/xiami.py diff --git a/youtube_dl/extractor/ximalaya.py b/haruhi_dl/extractor/ximalaya.py similarity index 100% rename from youtube_dl/extractor/ximalaya.py rename to haruhi_dl/extractor/ximalaya.py diff --git a/youtube_dl/extractor/xminus.py b/haruhi_dl/extractor/xminus.py similarity index 100% rename from youtube_dl/extractor/xminus.py rename to haruhi_dl/extractor/xminus.py diff --git a/youtube_dl/extractor/xnxx.py b/haruhi_dl/extractor/xnxx.py similarity index 100% rename from youtube_dl/extractor/xnxx.py rename to haruhi_dl/extractor/xnxx.py diff --git a/youtube_dl/extractor/xstream.py b/haruhi_dl/extractor/xstream.py similarity index 100% rename from youtube_dl/extractor/xstream.py rename to haruhi_dl/extractor/xstream.py diff --git a/youtube_dl/extractor/xtube.py b/haruhi_dl/extractor/xtube.py similarity index 100% rename from youtube_dl/extractor/xtube.py rename to haruhi_dl/extractor/xtube.py diff --git a/youtube_dl/extractor/xuite.py b/haruhi_dl/extractor/xuite.py similarity index 100% rename from youtube_dl/extractor/xuite.py rename to haruhi_dl/extractor/xuite.py diff --git a/youtube_dl/extractor/xvideos.py b/haruhi_dl/extractor/xvideos.py similarity index 100% rename from youtube_dl/extractor/xvideos.py rename to haruhi_dl/extractor/xvideos.py diff --git a/youtube_dl/extractor/xxxymovies.py b/haruhi_dl/extractor/xxxymovies.py similarity index 100% rename from youtube_dl/extractor/xxxymovies.py rename to haruhi_dl/extractor/xxxymovies.py diff --git a/youtube_dl/extractor/yahoo.py b/haruhi_dl/extractor/yahoo.py similarity index 100% rename from youtube_dl/extractor/yahoo.py rename to haruhi_dl/extractor/yahoo.py diff --git a/youtube_dl/extractor/yandexdisk.py b/haruhi_dl/extractor/yandexdisk.py similarity index 100% rename from youtube_dl/extractor/yandexdisk.py rename to haruhi_dl/extractor/yandexdisk.py diff --git a/youtube_dl/extractor/yandexmusic.py b/haruhi_dl/extractor/yandexmusic.py similarity index 98% rename from youtube_dl/extractor/yandexmusic.py rename to haruhi_dl/extractor/yandexmusic.py index 08d35e04c..c50bc8156 100644 --- a/youtube_dl/extractor/yandexmusic.py +++ b/haruhi_dl/extractor/yandexmusic.py @@ -27,12 +27,12 @@ class YandexMusicBaseIE(InfoExtractor): @staticmethod def _raise_captcha(): raise ExtractorError( - 'YandexMusic has considered youtube-dl requests automated and ' + 'YandexMusic has considered haruhi-dl requests automated and ' 'asks you to solve a CAPTCHA. You can either wait for some ' 'time until unblocked and optionally use --sleep-interval ' 'in future or alternatively you can go to https://music.yandex.ru/ ' 'solve CAPTCHA, then export cookies and pass cookie file to ' - 'youtube-dl with --cookies', + 'haruhi-dl with --cookies', expected=True) def _download_webpage_handle(self, *args, **kwargs): @@ -243,7 +243,7 @@ class YandexMusicPlaylistIE(YandexMusicPlaylistBaseIE): 'skip': 'Travis CI servers blocked by YandexMusic', }, { # playlist exceeding the limit of 150 tracks shipped with webpage (see - # https://github.com/ytdl-org/youtube-dl/issues/6666) + # https://github.com/ytdl-org/haruhi-dl/issues/6666) 'url': 'https://music.yandex.ru/users/ya.playlist/playlists/1036', 'info_dict': { 'id': '1036', diff --git a/youtube_dl/extractor/yandexvideo.py b/haruhi_dl/extractor/yandexvideo.py similarity index 100% rename from youtube_dl/extractor/yandexvideo.py rename to haruhi_dl/extractor/yandexvideo.py diff --git a/youtube_dl/extractor/yapfiles.py b/haruhi_dl/extractor/yapfiles.py similarity index 100% rename from youtube_dl/extractor/yapfiles.py rename to haruhi_dl/extractor/yapfiles.py diff --git a/youtube_dl/extractor/yesjapan.py b/haruhi_dl/extractor/yesjapan.py similarity index 100% rename from youtube_dl/extractor/yesjapan.py rename to haruhi_dl/extractor/yesjapan.py diff --git a/youtube_dl/extractor/yinyuetai.py b/haruhi_dl/extractor/yinyuetai.py similarity index 100% rename from youtube_dl/extractor/yinyuetai.py rename to haruhi_dl/extractor/yinyuetai.py diff --git a/youtube_dl/extractor/ynet.py b/haruhi_dl/extractor/ynet.py similarity index 100% rename from youtube_dl/extractor/ynet.py rename to haruhi_dl/extractor/ynet.py diff --git a/youtube_dl/extractor/youjizz.py b/haruhi_dl/extractor/youjizz.py similarity index 100% rename from youtube_dl/extractor/youjizz.py rename to haruhi_dl/extractor/youjizz.py diff --git a/youtube_dl/extractor/youku.py b/haruhi_dl/extractor/youku.py similarity index 100% rename from youtube_dl/extractor/youku.py rename to haruhi_dl/extractor/youku.py diff --git a/youtube_dl/extractor/younow.py b/haruhi_dl/extractor/younow.py similarity index 100% rename from youtube_dl/extractor/younow.py rename to haruhi_dl/extractor/younow.py diff --git a/youtube_dl/extractor/youporn.py b/haruhi_dl/extractor/youporn.py similarity index 100% rename from youtube_dl/extractor/youporn.py rename to haruhi_dl/extractor/youporn.py diff --git a/youtube_dl/extractor/yourporn.py b/haruhi_dl/extractor/yourporn.py similarity index 100% rename from youtube_dl/extractor/yourporn.py rename to haruhi_dl/extractor/yourporn.py diff --git a/youtube_dl/extractor/yourupload.py b/haruhi_dl/extractor/yourupload.py similarity index 100% rename from youtube_dl/extractor/yourupload.py rename to haruhi_dl/extractor/yourupload.py diff --git a/youtube_dl/extractor/youtube.py b/haruhi_dl/extractor/youtube.py similarity index 98% rename from youtube_dl/extractor/youtube.py rename to haruhi_dl/extractor/youtube.py index 4b198e5da..e2ae00e98 100644 --- a/youtube_dl/extractor/youtube.py +++ b/haruhi_dl/extractor/youtube.py @@ -492,7 +492,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): '135': {'ext': 'mp4', 'height': 480, 'format_note': 'DASH video', 'vcodec': 'h264'}, '136': {'ext': 'mp4', 'height': 720, 'format_note': 'DASH video', 'vcodec': 'h264'}, '137': {'ext': 'mp4', 'height': 1080, 'format_note': 'DASH video', 'vcodec': 'h264'}, - '138': {'ext': 'mp4', 'format_note': 'DASH video', 'vcodec': 'h264'}, # Height can vary (https://github.com/ytdl-org/youtube-dl/issues/4559) + '138': {'ext': 'mp4', 'format_note': 'DASH video', 'vcodec': 'h264'}, # Height can vary (https://github.com/ytdl-org/haruhi-dl/issues/4559) '160': {'ext': 'mp4', 'height': 144, 'format_note': 'DASH video', 'vcodec': 'h264'}, '212': {'ext': 'mp4', 'height': 480, 'format_note': 'DASH video', 'vcodec': 'h264'}, '264': {'ext': 'mp4', 'height': 1440, 'format_note': 'DASH video', 'vcodec': 'h264'}, @@ -562,16 +562,16 @@ class YoutubeIE(YoutubeBaseInfoExtractor): 'info_dict': { 'id': 'BaW_jenozKc', 'ext': 'mp4', - 'title': 'youtube-dl test video "\'/\\ä↭𝕐', + 'title': 'haruhi-dl test video "\'/\\ä↭𝕐', 'uploader': 'Philipp Hagemeister', 'uploader_id': 'phihag', 'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/phihag', 'channel_id': 'UCLqxVugv74EIW3VWh2NOa3Q', 'channel_url': r're:https?://(?:www\.)?youtube\.com/channel/UCLqxVugv74EIW3VWh2NOa3Q', 'upload_date': '20121002', - 'description': 'test chars: "\'/\\ä↭𝕐\ntest URL: https://github.com/rg3/youtube-dl/issues/1892\n\nThis is a test video for youtube-dl.\n\nFor more information, contact phihag@phihag.de .', + 'description': 'test chars: "\'/\\ä↭𝕐\ntest URL: https://github.com/rg3/haruhi-dl/issues/1892\n\nThis is a test video for haruhi-dl.\n\nFor more information, contact phihag@phihag.de .', 'categories': ['Science & Technology'], - 'tags': ['youtube-dl'], + 'tags': ['haruhi-dl'], 'duration': 10, 'view_count': int, 'like_count': int, @@ -643,14 +643,14 @@ class YoutubeIE(YoutubeBaseInfoExtractor): 'info_dict': { 'id': 'BaW_jenozKc', 'ext': 'mp4', - 'title': 'youtube-dl test video "\'/\\ä↭𝕐', + 'title': 'haruhi-dl test video "\'/\\ä↭𝕐', 'uploader': 'Philipp Hagemeister', 'uploader_id': 'phihag', 'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/phihag', 'upload_date': '20121002', - 'description': 'test chars: "\'/\\ä↭𝕐\ntest URL: https://github.com/rg3/youtube-dl/issues/1892\n\nThis is a test video for youtube-dl.\n\nFor more information, contact phihag@phihag.de .', + 'description': 'test chars: "\'/\\ä↭𝕐\ntest URL: https://github.com/rg3/haruhi-dl/issues/1892\n\nThis is a test video for haruhi-dl.\n\nFor more information, contact phihag@phihag.de .', 'categories': ['Science & Technology'], - 'tags': ['youtube-dl'], + 'tags': ['haruhi-dl'], 'duration': 10, 'view_count': int, 'like_count': int, @@ -762,7 +762,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): 'age_limit': 18, }, }, - # video_info is None (https://github.com/ytdl-org/youtube-dl/issues/4421) + # video_info is None (https://github.com/ytdl-org/haruhi-dl/issues/4421) # YouTube Red ad is not captured for creator { 'url': '__2ABJjxzNo', @@ -783,7 +783,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): 'DASH manifest missing', ] }, - # Olympics (https://github.com/ytdl-org/youtube-dl/issues/4431) + # Olympics (https://github.com/ytdl-org/haruhi-dl/issues/4431) { 'url': 'lqQg6PlCWgI', 'info_dict': { @@ -834,7 +834,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): }, 'skip': 'This live event has ended.', }, - # Extraction from multiple DASH manifests (https://github.com/ytdl-org/youtube-dl/pull/6097) + # Extraction from multiple DASH manifests (https://github.com/ytdl-org/haruhi-dl/pull/6097) { 'url': 'https://www.youtube.com/watch?v=FIl7x6_3R5Y', 'info_dict': { @@ -937,7 +937,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): 'skip': 'This video is not available.', }, { - # Multifeed video with comma in title (see https://github.com/ytdl-org/youtube-dl/issues/8536) + # Multifeed video with comma in title (see https://github.com/ytdl-org/haruhi-dl/issues/8536) 'url': 'https://www.youtube.com/watch?v=gVfLd0zydlo', 'info_dict': { 'id': 'gVfLd0zydlo', @@ -955,10 +955,10 @@ class YoutubeIE(YoutubeBaseInfoExtractor): 'only_matching': True, }, { - # Title with JS-like syntax "};" (see https://github.com/ytdl-org/youtube-dl/issues/7468) + # Title with JS-like syntax "};" (see https://github.com/ytdl-org/haruhi-dl/issues/7468) # Also tests cut-off URL expansion in video description (see - # https://github.com/ytdl-org/youtube-dl/issues/1892, - # https://github.com/ytdl-org/youtube-dl/issues/8164) + # https://github.com/ytdl-org/haruhi-dl/issues/1892, + # https://github.com/ytdl-org/haruhi-dl/issues/8164) 'url': 'https://www.youtube.com/watch?v=lsguqyKfVQg', 'info_dict': { 'id': 'lsguqyKfVQg', @@ -981,7 +981,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): }, }, { - # Tags with '};' (see https://github.com/ytdl-org/youtube-dl/issues/7468) + # Tags with '};' (see https://github.com/ytdl-org/haruhi-dl/issues/7468) 'url': 'https://www.youtube.com/watch?v=Ms7iBXnlUO8', 'only_matching': True, }, @@ -1045,7 +1045,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): 'only_matching': True, }, { - # YouTube Red paid video (https://github.com/ytdl-org/youtube-dl/issues/10059) + # YouTube Red paid video (https://github.com/ytdl-org/haruhi-dl/issues/10059) 'url': 'https://www.youtube.com/watch?v=i1Ko8UG-Tdo', 'only_matching': True, }, @@ -1468,8 +1468,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor): # regex won't capture the whole JSON. Yet working around by trying more # concrete regex first keeping in mind proper quoted string handling # to be implemented in future that will replace this workaround (see - # https://github.com/ytdl-org/youtube-dl/issues/7468, - # https://github.com/ytdl-org/youtube-dl/pull/7599) + # https://github.com/ytdl-org/haruhi-dl/issues/7468, + # https://github.com/ytdl-org/haruhi-dl/pull/7599) r';ytplayer\.config\s*=\s*({.+?});ytplayer', r';ytplayer\.config\s*=\s*({.+?});', ) @@ -1858,7 +1858,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): add_dash_mpd(video_info) # Rental video is not rented but preview is available (e.g. # https://www.youtube.com/watch?v=yYr8q0y5Jfg, - # https://github.com/ytdl-org/youtube-dl/issues/10532) + # https://github.com/ytdl-org/haruhi-dl/issues/10532) if not video_info and args.get('ypc_vid'): return self.url_result( args['ypc_vid'], YoutubeIE.ie_key(), video_id=args['ypc_vid']) @@ -1943,7 +1943,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): for feed in multifeed_metadata_list.split(','): # Unquote should take place before split on comma (,) since textual # fields may contain comma as well (see - # https://github.com/ytdl-org/youtube-dl/issues/8536) + # https://github.com/ytdl-org/haruhi-dl/issues/8536) feed_data = compat_parse_qs(compat_urllib_parse_unquote_plus(feed)) def feed_entry(name): @@ -1984,7 +1984,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): # Check for "rental" videos if 'ypc_video_rental_bar_text' in video_info and 'author' not in video_info: - raise ExtractorError('"rental" videos not supported. See https://github.com/ytdl-org/youtube-dl/issues/359 for more information.', expected=True) + raise ExtractorError('"rental" videos not supported. See https://github.com/ytdl-org/haruhi-dl/issues/359 for more information.', expected=True) def _extract_filesize(media_url): return int_or_none(self._search_regex( @@ -2004,7 +2004,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): elif not is_live and (streaming_formats or len(video_info.get('url_encoded_fmt_stream_map', [''])[0]) >= 1 or len(video_info.get('adaptive_fmts', [''])[0]) >= 1): encoded_url_map = video_info.get('url_encoded_fmt_stream_map', [''])[0] + ',' + video_info.get('adaptive_fmts', [''])[0] if 'rtmpe%3Dyes' in encoded_url_map: - raise ExtractorError('rtmpe downloads are not supported, see https://github.com/ytdl-org/youtube-dl/issues/343 for more information.', expected=True) + raise ExtractorError('rtmpe downloads are not supported, see https://github.com/ytdl-org/haruhi-dl/issues/343 for more information.', expected=True) formats = [] formats_spec = {} fmt_list = video_info.get('fmt_list', [''])[0] @@ -2126,7 +2126,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): dct.update(formats_spec[format_id]) # Some itags are not included in DASH manifest thus corresponding formats will - # lack metadata (see https://github.com/ytdl-org/youtube-dl/pull/5993). + # lack metadata (see https://github.com/ytdl-org/haruhi-dl/pull/5993). # Trying to extract metadata from url_encoded_fmt_stream_map entry. mobj = re.search(r'^(?P<width>\d+)[xX](?P<height>\d+)$', url_data.get('size', [''])[0]) width, height = (int(mobj.group('width')), int(mobj.group('height'))) if mobj else (None, None) @@ -2462,7 +2462,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): # Remove the formats we found through non-DASH, they # contain less info and it can be wrong, because we use # fixed values (for example the resolution). See - # https://github.com/ytdl-org/youtube-dl/issues/5774 for an + # https://github.com/ytdl-org/haruhi-dl/issues/5774 for an # example. formats = [f for f in formats if f['format_id'] not in dash_formats.keys()] formats.extend(dash_formats.values()) @@ -2584,7 +2584,7 @@ class YoutubePlaylistIE(YoutubePlaylistBaseInfoExtractor): 'uploader_id': 'UCmlqkdCBesrv2Lak1mF_MxA', 'uploader': 'Sergey M.', 'id': 'PL4lCao7KL_QFVb7Iudeipvc2BCavECqzc', - 'title': 'youtube-dl public playlist', + 'title': 'haruhi-dl public playlist', }, 'playlist_count': 1, }, { @@ -2593,7 +2593,7 @@ class YoutubePlaylistIE(YoutubePlaylistBaseInfoExtractor): 'uploader_id': 'UCmlqkdCBesrv2Lak1mF_MxA', 'uploader': 'Sergey M.', 'id': 'PL4lCao7KL_QFodcLWhDpGCYnngnHtQ-Xf', - 'title': 'youtube-dl empty playlist', + 'title': 'haruhi-dl empty playlist', }, 'playlist_count': 0, }, { @@ -2717,7 +2717,7 @@ class YoutubePlaylistIE(YoutubePlaylistBaseInfoExtractor): 'skip_download': True, }, }, { - # https://github.com/ytdl-org/youtube-dl/issues/21844 + # https://github.com/ytdl-org/haruhi-dl/issues/21844 'url': 'https://www.youtube.com/playlist?list=PLzH6n4zXuckpfMu_4Ff8E7Z1behQks5ba', 'info_dict': { 'title': 'Data Analysis with Dr Mike Pound', @@ -2811,7 +2811,7 @@ class YoutubePlaylistIE(YoutubePlaylistBaseInfoExtractor): url = self._TEMPLATE_URL % playlist_id page = self._download_webpage(url, playlist_id) - # the yt-alert-message now has tabindex attribute (see https://github.com/ytdl-org/youtube-dl/issues/11604) + # the yt-alert-message now has tabindex attribute (see https://github.com/ytdl-org/haruhi-dl/issues/11604) for match in re.findall(r'<div class="yt-alert-message"[^>]*>([^<]+)</div>', page): match = match.strip() # Check if the playlist exists or is private @@ -2904,7 +2904,7 @@ class YoutubePlaylistIE(YoutubePlaylistBaseInfoExtractor): return playlist # Some playlist URLs don't actually serve a playlist (see - # https://github.com/ytdl-org/youtube-dl/issues/10537). + # https://github.com/ytdl-org/haruhi-dl/issues/10537). # Fallback to plain video extraction if there is a video id # along with playlist id. return self.url_result(video_id, 'Youtube', video_id=video_id) @@ -3262,10 +3262,10 @@ class YoutubeSearchURLIE(YoutubeSearchBaseInfoExtractor): IE_NAME = 'youtube:search_url' _VALID_URL = r'https?://(?:www\.)?youtube\.com/results\?(.*?&)?(?:search_query|q)=(?P<query>[^&]+)(?:[&]|$)' _TESTS = [{ - 'url': 'https://www.youtube.com/results?baz=bar&search_query=youtube-dl+test+video&filters=video&lclk=video', + 'url': 'https://www.youtube.com/results?baz=bar&search_query=haruhi-dl+test+video&filters=video&lclk=video', 'playlist_mincount': 5, 'info_dict': { - 'title': 'youtube-dl test video', + 'title': 'haruhi-dl test video', } }, { 'url': 'https://www.youtube.com/results?q=test&sp=EgQIBBgB', @@ -3449,9 +3449,9 @@ class YoutubeTruncatedURLIE(InfoExtractor): raise ExtractorError( 'Did you forget to quote the URL? Remember that & is a meta ' 'character in most shells, so you want to put the URL in quotes, ' - 'like youtube-dl ' + 'like haruhi-dl ' '"https://www.youtube.com/watch?feature=foo&v=BaW_jenozKc" ' - ' or simply youtube-dl BaW_jenozKc .', + ' or simply haruhi-dl BaW_jenozKc .', expected=True) diff --git a/youtube_dl/extractor/zapiks.py b/haruhi_dl/extractor/zapiks.py similarity index 100% rename from youtube_dl/extractor/zapiks.py rename to haruhi_dl/extractor/zapiks.py diff --git a/youtube_dl/extractor/zaq1.py b/haruhi_dl/extractor/zaq1.py similarity index 100% rename from youtube_dl/extractor/zaq1.py rename to haruhi_dl/extractor/zaq1.py diff --git a/youtube_dl/extractor/zattoo.py b/haruhi_dl/extractor/zattoo.py similarity index 100% rename from youtube_dl/extractor/zattoo.py rename to haruhi_dl/extractor/zattoo.py diff --git a/youtube_dl/extractor/zdf.py b/haruhi_dl/extractor/zdf.py similarity index 100% rename from youtube_dl/extractor/zdf.py rename to haruhi_dl/extractor/zdf.py diff --git a/youtube_dl/extractor/zingmp3.py b/haruhi_dl/extractor/zingmp3.py similarity index 100% rename from youtube_dl/extractor/zingmp3.py rename to haruhi_dl/extractor/zingmp3.py diff --git a/youtube_dl/extractor/zype.py b/haruhi_dl/extractor/zype.py similarity index 100% rename from youtube_dl/extractor/zype.py rename to haruhi_dl/extractor/zype.py diff --git a/youtube_dl/options.py b/haruhi_dl/options.py similarity index 95% rename from youtube_dl/options.py rename to haruhi_dl/options.py index 6d5ac62b3..b83ef9de5 100644 --- a/youtube_dl/options.py +++ b/haruhi_dl/options.py @@ -45,7 +45,7 @@ def parseOpts(overrideArguments=None): except IOError: return default # silently skip if file is not present try: - # FIXME: https://github.com/ytdl-org/youtube-dl/commit/dfe5fa49aed02cf36ba9f743b11b0903554b5e56 + # FIXME: https://github.com/ytdl-org/haruhi-dl/commit/dfe5fa49aed02cf36ba9f743b11b0903554b5e56 contents = optionf.read() if sys.version_info < (3,): contents = contents.decode(preferredencoding()) @@ -57,33 +57,33 @@ def parseOpts(overrideArguments=None): def _readUserConf(): xdg_config_home = compat_getenv('XDG_CONFIG_HOME') if xdg_config_home: - userConfFile = os.path.join(xdg_config_home, 'youtube-dl', 'config') + userConfFile = os.path.join(xdg_config_home, 'haruhi-dl', 'config') if not os.path.isfile(userConfFile): - userConfFile = os.path.join(xdg_config_home, 'youtube-dl.conf') + userConfFile = os.path.join(xdg_config_home, 'haruhi-dl.conf') else: - userConfFile = os.path.join(compat_expanduser('~'), '.config', 'youtube-dl', 'config') + userConfFile = os.path.join(compat_expanduser('~'), '.config', 'haruhi-dl', 'config') if not os.path.isfile(userConfFile): - userConfFile = os.path.join(compat_expanduser('~'), '.config', 'youtube-dl.conf') + userConfFile = os.path.join(compat_expanduser('~'), '.config', 'haruhi-dl.conf') userConf = _readOptions(userConfFile, None) if userConf is None: appdata_dir = compat_getenv('appdata') if appdata_dir: userConf = _readOptions( - os.path.join(appdata_dir, 'youtube-dl', 'config'), + os.path.join(appdata_dir, 'haruhi-dl', 'config'), default=None) if userConf is None: userConf = _readOptions( - os.path.join(appdata_dir, 'youtube-dl', 'config.txt'), + os.path.join(appdata_dir, 'haruhi-dl', 'config.txt'), default=None) if userConf is None: userConf = _readOptions( - os.path.join(compat_expanduser('~'), 'youtube-dl.conf'), + os.path.join(compat_expanduser('~'), 'haruhi-dl.conf'), default=None) if userConf is None: userConf = _readOptions( - os.path.join(compat_expanduser('~'), 'youtube-dl.conf.txt'), + os.path.join(compat_expanduser('~'), 'haruhi-dl.conf.txt'), default=None) if userConf is None: @@ -168,14 +168,14 @@ def parseOpts(overrideArguments=None): general.add_option( '--default-search', dest='default_search', metavar='PREFIX', - help='Use this prefix for unqualified URLs. For example "gvsearch2:" downloads two videos from google videos for youtube-dl "large apple". Use the value "auto" to let youtube-dl guess ("auto_warning" to emit a warning when guessing). "error" just throws an error. The default value "fixup_error" repairs broken URLs, but emits an error if this is not possible instead of searching.') + help='Use this prefix for unqualified URLs. For example "gvsearch2:" downloads two videos from google videos for haruhi-dl "large apple". Use the value "auto" to let haruhi-dl guess ("auto_warning" to emit a warning when guessing). "error" just throws an error. The default value "fixup_error" repairs broken URLs, but emits an error if this is not possible instead of searching.') general.add_option( '--ignore-config', action='store_true', help='Do not read configuration files. ' - 'When given in the global configuration file /etc/youtube-dl.conf: ' - 'Do not read the user configuration in ~/.config/youtube-dl/config ' - '(%APPDATA%/youtube-dl/config.txt on Windows)') + 'When given in the global configuration file /etc/haruhi-dl.conf: ' + 'Do not read the user configuration in ~/.config/haruhi-dl/config ' + '(%APPDATA%/haruhi-dl/config.txt on Windows)') general.add_option( '--config-location', dest='config_location', metavar='PATH', @@ -357,7 +357,7 @@ def parseOpts(overrideArguments=None): authentication.add_option( '-p', '--password', dest='password', metavar='PASSWORD', - help='Account password. If this option is left out, youtube-dl will ask interactively.') + help='Account password. If this option is left out, haruhi-dl will ask interactively.') authentication.add_option( '-2', '--twofactor', dest='twofactor', metavar='TWOFACTOR', @@ -383,7 +383,7 @@ def parseOpts(overrideArguments=None): adobe_pass.add_option( '--ap-password', dest='ap_password', metavar='PASSWORD', - help='Multiple-system operator account password. If this option is left out, youtube-dl will ask interactively.') + help='Multiple-system operator account password. If this option is left out, haruhi-dl will ask interactively.') adobe_pass.add_option( '--ap-list-mso', action='store_true', dest='ap_list_mso', default=False, @@ -502,7 +502,7 @@ def parseOpts(overrideArguments=None): downloader.add_option( '--xattr-set-filesize', dest='xattr_set_filesize', action='store_true', - help='Set file xattribute ytdl.filesize with expected file size') + help='Set file xattribute hdl.filesize with expected file size') downloader.add_option( '--hls-prefer-native', dest='hls_prefer_native', action='store_true', default=None, @@ -670,11 +670,11 @@ def parseOpts(overrideArguments=None): verbosity.add_option( '-C', '--call-home', dest='call_home', action='store_true', default=False, - help='Contact the youtube-dl server for debugging') + help='Contact the haruhi-dl server for debugging') verbosity.add_option( '--no-call-home', dest='call_home', action='store_false', default=False, - help='Do NOT contact the youtube-dl server for debugging') + help='Do NOT contact the haruhi-dl server for debugging') filesystem = optparse.OptionGroup(parser, 'Filesystem Options') filesystem.add_option( @@ -720,7 +720,7 @@ def parseOpts(overrideArguments=None): filesystem.add_option( '-c', '--continue', action='store_true', dest='continue_dl', default=True, - help='Force resume of partially downloaded files. By default, youtube-dl will resume downloads if possible.') + help='Force resume of partially downloaded files. By default, haruhi-dl will resume downloads if possible.') filesystem.add_option( '--no-continue', action='store_false', dest='continue_dl', @@ -755,7 +755,7 @@ def parseOpts(overrideArguments=None): help='File to read cookies from and dump cookie jar in') filesystem.add_option( '--cache-dir', dest='cachedir', default=None, metavar='DIR', - help='Location in the filesystem where youtube-dl can store some downloaded information permanently. By default $XDG_CACHE_HOME/youtube-dl or ~/.cache/youtube-dl . At the moment, only YouTube player files (for videos with obfuscated signatures) are cached, but that may change.') + help='Location in the filesystem where haruhi-dl can store some downloaded information permanently. By default $XDG_CACHE_HOME/haruhi-dl or ~/.cache/haruhi-dl . At the moment, only YouTube player files (for videos with obfuscated signatures) are cached, but that may change.') filesystem.add_option( '--no-cache-dir', action='store_const', const=False, dest='cachedir', help='Disable filesystem caching') @@ -892,14 +892,14 @@ def parseOpts(overrideArguments=None): if '--config-location' in command_line_conf: location = compat_expanduser(opts.config_location) if os.path.isdir(location): - location = os.path.join(location, 'youtube-dl.conf') + location = os.path.join(location, 'haruhi-dl.conf') if not os.path.exists(location): parser.error('config-location %s does not exist.' % location) custom_conf = _readOptions(location) elif '--ignore-config' in command_line_conf: pass else: - system_conf = _readOptions('/etc/youtube-dl.conf') + system_conf = _readOptions('/etc/haruhi-dl.conf') if '--ignore-config' not in system_conf: user_conf = _readUserConf() diff --git a/youtube_dl/postprocessor/__init__.py b/haruhi_dl/postprocessor/__init__.py similarity index 100% rename from youtube_dl/postprocessor/__init__.py rename to haruhi_dl/postprocessor/__init__.py diff --git a/youtube_dl/postprocessor/common.py b/haruhi_dl/postprocessor/common.py similarity index 100% rename from youtube_dl/postprocessor/common.py rename to haruhi_dl/postprocessor/common.py diff --git a/youtube_dl/postprocessor/embedthumbnail.py b/haruhi_dl/postprocessor/embedthumbnail.py similarity index 100% rename from youtube_dl/postprocessor/embedthumbnail.py rename to haruhi_dl/postprocessor/embedthumbnail.py diff --git a/youtube_dl/postprocessor/execafterdownload.py b/haruhi_dl/postprocessor/execafterdownload.py similarity index 100% rename from youtube_dl/postprocessor/execafterdownload.py rename to haruhi_dl/postprocessor/execafterdownload.py diff --git a/youtube_dl/postprocessor/ffmpeg.py b/haruhi_dl/postprocessor/ffmpeg.py similarity index 99% rename from youtube_dl/postprocessor/ffmpeg.py rename to haruhi_dl/postprocessor/ffmpeg.py index 5f7298345..a0542bc44 100644 --- a/youtube_dl/postprocessor/ffmpeg.py +++ b/haruhi_dl/postprocessor/ffmpeg.py @@ -533,7 +533,7 @@ class FFmpegMergerPP(FFmpegPostProcessor): if is_outdated_version( self._versions[self.basename], required_version): warning = ('Your copy of %s is outdated and unable to properly mux separate video and audio files, ' - 'youtube-dl will download single file media. ' + 'haruhi-dl will download single file media. ' 'Update %s to version %s or newer to fix this.') % ( self.basename, self.basename, required_version) if self._downloader: diff --git a/youtube_dl/postprocessor/metadatafromtitle.py b/haruhi_dl/postprocessor/metadatafromtitle.py similarity index 100% rename from youtube_dl/postprocessor/metadatafromtitle.py rename to haruhi_dl/postprocessor/metadatafromtitle.py diff --git a/youtube_dl/postprocessor/xattrpp.py b/haruhi_dl/postprocessor/xattrpp.py similarity index 100% rename from youtube_dl/postprocessor/xattrpp.py rename to haruhi_dl/postprocessor/xattrpp.py diff --git a/youtube_dl/socks.py b/haruhi_dl/socks.py similarity index 100% rename from youtube_dl/socks.py rename to haruhi_dl/socks.py diff --git a/youtube_dl/update.py b/haruhi_dl/update.py similarity index 93% rename from youtube_dl/update.py rename to haruhi_dl/update.py index 84c964617..eb3ad468f 100644 --- a/youtube_dl/update.py +++ b/haruhi_dl/update.py @@ -38,7 +38,7 @@ def update_self(to_screen, verbose, opener): UPDATES_RSA_KEY = (0x9d60ee4d8f805312fdb15a62f87b95bd66177b91df176765d13514a0f1754bcd2057295c5b6f1d35daa6742c3ffc9a82d3e118861c207995a8031e151d863c9927e304576bc80692bc8e094896fcf11b66f3e29e04e3a71e9a11558558acea1840aec37fc396fb6b65dc81a1c4144e03bd1c011de62e3f1357b327d08426fe93, 65537) if not isinstance(globals().get('__loader__'), zipimporter) and not hasattr(sys, 'frozen'): - to_screen('It looks like you installed youtube-dl with a package manager, pip, setup.py or a tarball. Please use that to update.') + to_screen('It looks like you installed haruhi-dl with a package manager, pip, setup.py or a tarball. Please use that to update.') return # Check if there is a new version @@ -50,7 +50,7 @@ def update_self(to_screen, verbose, opener): to_screen('ERROR: can\'t find the current version. Please try again later.') return if newversion == __version__: - to_screen('youtube-dl is up-to-date (' + __version__ + ')') + to_screen('haruhi-dl is up-to-date (' + __version__ + ')') return # Download and check versions info @@ -76,7 +76,7 @@ def update_self(to_screen, verbose, opener): def version_tuple(version_str): return tuple(map(int, version_str.split('.'))) if version_tuple(__version__) >= version_tuple(version_id): - to_screen('youtube-dl is up to date (%s)' % __version__) + to_screen('haruhi-dl is up to date (%s)' % __version__) return to_screen('Updating to version ' + version_id + ' ...') @@ -126,14 +126,14 @@ def update_self(to_screen, verbose, opener): return try: - bat = os.path.join(directory, 'youtube-dl-updater.bat') + bat = os.path.join(directory, 'haruhi-dl-updater.bat') with io.open(bat, 'w') as batfile: batfile.write(''' @echo off echo Waiting for file handle to be closed ... ping 127.0.0.1 -n 5 -w 1000 > NUL move /Y "%s.new" "%s" > NUL -echo Updated youtube-dl to version %s. +echo Updated haruhi-dl to version %s. start /b "" cmd /c del "%%~f0"&exit /b" \n''' % (exe, exe, version_id)) @@ -171,7 +171,7 @@ start /b "" cmd /c del "%%~f0"&exit /b" to_screen('ERROR: unable to overwrite current version') return - to_screen('Updated youtube-dl. Restart youtube-dl to use the new version.') + to_screen('Updated haruhi-dl. Restart haruhi-dl to use the new version.') def get_notes(versions, fromVersion): diff --git a/youtube_dl/utils.py b/haruhi_dl/utils.py similarity index 98% rename from youtube_dl/utils.py rename to haruhi_dl/utils.py index 737e2810e..27c3072fa 100644 --- a/youtube_dl/utils.py +++ b/haruhi_dl/utils.py @@ -2142,7 +2142,7 @@ def sanitize_url(url): return 'http:%s' % url # Fix some common typos seen so far COMMON_TYPOS = ( - # https://github.com/ytdl-org/youtube-dl/issues/15649 + # https://github.com/ytdl-org/haruhi-dl/issues/15649 (r'^httpss://', r'https://'), # https://bx1.be/lives/direct-tv/ (r'^rmtp([es]?)://', r'rtmp\1://'), @@ -2192,7 +2192,7 @@ def _htmlentity_transform(entity_with_semicolon): numstr = '0%s' % numstr else: base = 10 - # See https://github.com/ytdl-org/youtube-dl/issues/7518 + # See https://github.com/ytdl-org/haruhi-dl/issues/7518 try: return compat_chr(int(numstr, base)) except ValueError: @@ -2298,45 +2298,45 @@ def make_HTTPS_handler(params, **kwargs): context.check_hostname = False context.verify_mode = ssl.CERT_NONE try: - return YoutubeDLHTTPSHandler(params, context=context, **kwargs) + return HaruhiDLHTTPSHandler(params, context=context, **kwargs) except TypeError: # Python 2.7.8 # (create_default_context present but HTTPSHandler has no context=) pass if sys.version_info < (3, 2): - return YoutubeDLHTTPSHandler(params, **kwargs) + return HaruhiDLHTTPSHandler(params, **kwargs) else: # Python < 3.4 context = ssl.SSLContext(ssl.PROTOCOL_TLSv1) context.verify_mode = (ssl.CERT_NONE if opts_no_check_certificate else ssl.CERT_REQUIRED) context.set_default_verify_paths() - return YoutubeDLHTTPSHandler(params, context=context, **kwargs) + return HaruhiDLHTTPSHandler(params, context=context, **kwargs) def bug_reports_message(): if ytdl_is_updateable(): - update_cmd = 'type youtube-dl -U to update' + update_cmd = 'type haruhi-dl -U to update' else: update_cmd = 'see https://yt-dl.org/update 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 += ' Be sure to call youtube-dl with the --verbose flag and include its complete output.' + msg += ' Be sure to call haruhi-dl with the --verbose flag and include its complete output.' return msg -class YoutubeDLError(Exception): - """Base exception for YoutubeDL errors.""" +class HaruhiDLError(Exception): + """Base exception for HaruhiDL errors.""" pass -class ExtractorError(YoutubeDLError): +class ExtractorError(HaruhiDLError): """Error during info extraction.""" def __init__(self, msg, tb=None, expected=False, cause=None, video_id=None): """ tb, if given, is the original traceback (so that it can be printed out). - If expected is set, this is a normal error message and most likely not a bug in youtube-dl. + If expected is set, this is a normal error message and most likely not a bug in haruhi-dl. """ if sys.exc_info()[0] in (compat_urllib_error.URLError, socket.timeout, UnavailableVideoError): @@ -2384,7 +2384,7 @@ class GeoRestrictedError(ExtractorError): self.countries = countries -class DownloadError(YoutubeDLError): +class DownloadError(HaruhiDLError): """Download Error exception. This exception may be thrown by FileDownloader objects if they are not @@ -2398,7 +2398,7 @@ class DownloadError(YoutubeDLError): self.exc_info = exc_info -class SameFileError(YoutubeDLError): +class SameFileError(HaruhiDLError): """Same File exception. This exception will be thrown by FileDownloader objects if they detect @@ -2407,7 +2407,7 @@ class SameFileError(YoutubeDLError): pass -class PostProcessingError(YoutubeDLError): +class PostProcessingError(HaruhiDLError): """Post Processing exception. This exception may be raised by PostProcessor's .run() method to @@ -2419,12 +2419,12 @@ class PostProcessingError(YoutubeDLError): self.msg = msg -class MaxDownloadsReached(YoutubeDLError): +class MaxDownloadsReached(HaruhiDLError): """ --max-downloads limit has been reached. """ pass -class UnavailableVideoError(YoutubeDLError): +class UnavailableVideoError(HaruhiDLError): """Unavailable Format exception. This exception will be thrown when a video is requested @@ -2433,7 +2433,7 @@ class UnavailableVideoError(YoutubeDLError): pass -class ContentTooShortError(YoutubeDLError): +class ContentTooShortError(HaruhiDLError): """Content Too Short exception. This exception may be raised by FileDownloader objects when a file they @@ -2450,7 +2450,7 @@ class ContentTooShortError(YoutubeDLError): self.expected = expected -class XAttrMetadataError(YoutubeDLError): +class XAttrMetadataError(HaruhiDLError): def __init__(self, code=None, msg='Unknown error'): super(XAttrMetadataError, self).__init__(msg) self.code = code @@ -2466,14 +2466,14 @@ class XAttrMetadataError(YoutubeDLError): self.reason = 'NOT_SUPPORTED' -class XAttrUnavailableError(YoutubeDLError): +class XAttrUnavailableError(HaruhiDLError): pass def _create_http_connection(ydl_handler, http_class, is_https, *args, **kwargs): # Working around python 2 bug (see http://bugs.python.org/issue17849) by limiting # expected HTTP responses to meet HTTP/1.0 or later (see also - # https://github.com/ytdl-org/youtube-dl/issues/6727) + # https://github.com/ytdl-org/haruhi-dl/issues/6727) if sys.version_info < (3, 0): kwargs['strict'] = True hc = http_class(*args, **compat_kwargs(kwargs)) @@ -2545,7 +2545,7 @@ def handle_youtubedl_headers(headers): return filtered_headers -class YoutubeDLHandler(compat_urllib_request.HTTPHandler): +class HaruhiDLHandler(compat_urllib_request.HTTPHandler): """Handler for HTTP requests and responses. This class, when installed with an OpenerDirector, automatically adds @@ -2594,7 +2594,7 @@ class YoutubeDLHandler(compat_urllib_request.HTTPHandler): # To work around aforementioned issue we will replace request's original URL with # percent-encoded one # Since redirects are also affected (e.g. http://www.southpark.de/alle-episoden/s18e09) - # the code of this workaround has been moved here from YoutubeDL.urlopen() + # the code of this workaround has been moved here from HaruhiDL.urlopen() url = req.get_full_url() url_escaped = escape_url(url) @@ -2647,7 +2647,7 @@ class YoutubeDLHandler(compat_urllib_request.HTTPHandler): resp.msg = old_resp.msg del resp.headers['Content-encoding'] # Percent-encode redirect URL of Location HTTP header to satisfy RFC 3986 (see - # https://github.com/ytdl-org/youtube-dl/issues/6457). + # https://github.com/ytdl-org/haruhi-dl/issues/6457). if 300 <= resp.code < 400: location = resp.headers.get('Location') if location: @@ -2711,7 +2711,7 @@ def make_socks_conn_class(base_class, socks_proxy): return SocksConnection -class YoutubeDLHTTPSHandler(compat_urllib_request.HTTPSHandler): +class HaruhiDLHTTPSHandler(compat_urllib_request.HTTPSHandler): def __init__(self, params, https_conn_class=None, *args, **kwargs): compat_urllib_request.HTTPSHandler.__init__(self, *args, **kwargs) self._https_conn_class = https_conn_class or compat_http_client.HTTPSConnection @@ -2736,7 +2736,7 @@ class YoutubeDLHTTPSHandler(compat_urllib_request.HTTPSHandler): req, **kwargs) -class YoutubeDLCookieJar(compat_cookiejar.MozillaCookieJar): +class HaruhiDLCookieJar(compat_cookiejar.MozillaCookieJar): """ See [1] for cookie file format. @@ -2745,7 +2745,7 @@ class YoutubeDLCookieJar(compat_cookiejar.MozillaCookieJar): _HTTPONLY_PREFIX = '#HttpOnly_' _ENTRY_LEN = 7 _HEADER = '''# Netscape HTTP Cookie File -# This file is generated by youtube-dl. Do not edit. +# This file is generated by haruhi-dl. Do not edit. ''' _CookieFileEntry = collections.namedtuple( @@ -2854,14 +2854,14 @@ class YoutubeDLCookieJar(compat_cookiejar.MozillaCookieJar): cookie.discard = True -class YoutubeDLCookieProcessor(compat_urllib_request.HTTPCookieProcessor): +class HaruhiDLCookieProcessor(compat_urllib_request.HTTPCookieProcessor): def __init__(self, cookiejar=None): compat_urllib_request.HTTPCookieProcessor.__init__(self, cookiejar) def http_response(self, request, response): # Python 2 will choke on next HTTP request in row if there are non-ASCII # characters in Set-Cookie HTTP header of last response (see - # https://github.com/ytdl-org/youtube-dl/issues/6769). + # https://github.com/ytdl-org/haruhi-dl/issues/6769). # In order to at least prevent crashing we will percent encode Set-Cookie # header before HTTPCookieProcessor starts processing it. # if sys.version_info < (3, 0) and response.headers: @@ -2878,7 +2878,7 @@ class YoutubeDLCookieProcessor(compat_urllib_request.HTTPCookieProcessor): https_response = http_response -class YoutubeDLRedirectHandler(compat_urllib_request.HTTPRedirectHandler): +class HaruhiDLRedirectHandler(compat_urllib_request.HTTPRedirectHandler): if sys.version_info[0] < 3: def redirect_request(self, req, fp, code, msg, headers, newurl): # On python 2 urlh.geturl() may sometimes return redirect URL @@ -3732,8 +3732,8 @@ def get_exe_version(exe, args=['--version'], or False if the executable is not present """ try: # STDIN should be redirected too. On UNIX-like systems, ffmpeg triggers - # SIGTTOU if youtube-dl is run in the background. - # See https://github.com/ytdl-org/youtube-dl/issues/955#issuecomment-209789656 + # SIGTTOU if haruhi-dl is run in the background. + # See https://github.com/ytdl-org/haruhi-dl/issues/955#issuecomment-209789656 out, _ = subprocess.Popen( [encodeArgument(exe)] + args, stdin=subprocess.PIPE, @@ -4144,7 +4144,7 @@ def is_outdated_version(version, limit, assume_new=True): def ytdl_is_updateable(): - """ Returns if youtube-dl can be updated with -U """ + """ Returns if haruhi-dl can be updated with -U """ from zipimport import zipimporter return isinstance(globals().get('__loader__'), zipimporter) or hasattr(sys, 'frozen') @@ -4339,7 +4339,7 @@ def _match_one(filter_part, dct): # If the original field is a string and matching comparisonvalue is # a number we should respect the origin of the original field # and process comparison value as a string (see - # https://github.com/ytdl-org/youtube-dl/issues/11082). + # https://github.com/ytdl-org/haruhi-dl/issues/11082). or actual_value is not None and m.group('intval') is not None and isinstance(actual_value, compat_str)): if m.group('op') not in ('=', '!='): @@ -5353,7 +5353,7 @@ class PerRequestProxyHandler(compat_urllib_request.ProxyHandler): return None # No Proxy if compat_urlparse.urlparse(proxy).scheme.lower() in ('socks', 'socks4', 'socks4a', 'socks5'): req.add_header('Ytdl-socks-proxy', proxy) - # youtube-dl's http/https handlers do wrapping the socket with socks + # haruhi-dl's http/https handlers do wrapping the socket with socks return None return compat_urllib_request.ProxyHandler.proxy_open( self, req, proxy, type) @@ -5505,7 +5505,7 @@ def urshift(val, n): # Based on png2str() written by @gdkchan and improved by @yokrysty -# Originally posted at https://github.com/ytdl-org/youtube-dl/issues/9706 +# Originally posted at https://github.com/ytdl-org/haruhi-dl/issues/9706 def decode_png(png_data): # Reference: https://www.w3.org/TR/PNG/ header = png_data[8:] @@ -5620,13 +5620,13 @@ def write_xattr(path, key, value): if hasattr(xattr, 'set'): # pyxattr # Unicode arguments are not supported in python-pyxattr until # version 0.5.0 - # See https://github.com/ytdl-org/youtube-dl/issues/5498 + # See https://github.com/ytdl-org/haruhi-dl/issues/5498 pyxattr_required_version = '0.5.0' if version_tuple(xattr.__version__) < version_tuple(pyxattr_required_version): # TODO: fallback to CLI tools raise XAttrUnavailableError( 'python-pyxattr is detected but is too old. ' - 'youtube-dl requires %s or above while your version is %s. ' + 'haruhi-dl requires %s or above while your version is %s. ' 'Falling back to other xattr implementations' % ( pyxattr_required_version, xattr.__version__)) diff --git a/youtube_dl/version.py b/haruhi_dl/version.py similarity index 100% rename from youtube_dl/version.py rename to haruhi_dl/version.py diff --git a/setup.cfg b/setup.cfg index da78a9c47..e5fc42bf1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,5 +2,5 @@ universal = True [flake8] -exclude = youtube_dl/extractor/__init__.py,devscripts/buildserver.py,devscripts/lazy_load_template.py,devscripts/make_issue_template.py,setup.py,build,.git,venv +exclude = haruhi_dl/extractor/__init__.py,devscripts/buildserver.py,devscripts/lazy_load_template.py,devscripts/make_issue_template.py,setup.py,build,.git,venv ignore = E402,E501,E731,E741,W503 diff --git a/setup.py b/setup.py index af68b485e..2cceada6d 100644 --- a/setup.py +++ b/setup.py @@ -32,20 +32,20 @@ py2exe_options = { 'dll_excludes': ['w9xpopen.exe', 'crypt32.dll'], } -# Get the version from youtube_dl/version.py without importing the package -exec(compile(open('youtube_dl/version.py').read(), - 'youtube_dl/version.py', 'exec')) +# Get the version from haruhi_dl/version.py without importing the package +exec(compile(open('haruhi_dl/version.py').read(), + 'haruhi_dl/version.py', 'exec')) DESCRIPTION = 'YouTube video downloader' LONG_DESCRIPTION = 'Command-line program to download videos from YouTube.com and other video sites' py2exe_console = [{ - 'script': './youtube_dl/__main__.py', - 'dest_base': 'youtube-dl', + 'script': './haruhi_dl/__main__.py', + 'dest_base': 'haruhi-dl', 'version': __version__, 'description': DESCRIPTION, 'comments': LONG_DESCRIPTION, - 'product_name': 'youtube-dl', + 'product_name': 'haruhi-dl', 'product_version': __version__, }] @@ -59,10 +59,10 @@ if len(sys.argv) >= 2 and sys.argv[1] == 'py2exe': params = py2exe_params else: files_spec = [ - ('etc/bash_completion.d', ['youtube-dl.bash-completion']), - ('etc/fish/completions', ['youtube-dl.fish']), - ('share/doc/youtube_dl', ['README.txt']), - ('share/man/man1', ['youtube-dl.1']) + ('etc/bash_completion.d', ['haruhi-dl.bash-completion']), + ('etc/fish/completions', ['haruhi-dl.fish']), + ('share/doc/haruhi_dl', ['README.txt']), + ('share/man/man1', ['haruhi-dl.1']) ] root = os.path.dirname(os.path.abspath(__file__)) data_files = [] @@ -79,9 +79,9 @@ else: 'data_files': data_files, } if setuptools_available: - params['entry_points'] = {'console_scripts': ['youtube-dl = youtube_dl:main']} + params['entry_points'] = {'console_scripts': ['haruhi-dl = haruhi_dl:main']} else: - params['scripts'] = ['bin/youtube-dl'] + params['scripts'] = ['bin/haruhi-dl'] class build_lazy_extractors(Command): description = 'Build the extractor lazy loading module' @@ -95,25 +95,25 @@ class build_lazy_extractors(Command): def run(self): spawn( - [sys.executable, 'devscripts/make_lazy_extractors.py', 'youtube_dl/extractor/lazy_extractors.py'], + [sys.executable, 'devscripts/make_lazy_extractors.py', 'haruhi_dl/extractor/lazy_extractors.py'], dry_run=self.dry_run, ) setup( - name='youtube_dl', + name='haruhi_dl', version=__version__, description=DESCRIPTION, long_description=LONG_DESCRIPTION, - url='https://github.com/ytdl-org/youtube-dl', + url='https://git.sakamoto.pl/laudom/haruhi-dl', author='Ricardo Garcia', - author_email='ytdl@yt-dl.org', - maintainer='Sergey M.', - maintainer_email='dstftw@gmail.com', + author_email='hdl@haruhi.download', + maintainer='Dominika Liberda', + maintainer_email='ja@sdomi.pl', license='Unlicense', packages=[ - 'youtube_dl', - 'youtube_dl.extractor', 'youtube_dl.downloader', - 'youtube_dl.postprocessor'], + 'haruhi_dl', + 'haruhi_dl.extractor', 'haruhi_dl.downloader', + 'haruhi_dl.postprocessor'], # Provokes warning on most systems (why?!) # test_suite = 'nose.collector', diff --git a/test/helper.py b/test/helper.py index e62aab11e..303335b52 100644 --- a/test/helper.py +++ b/test/helper.py @@ -10,13 +10,13 @@ import types import ssl import sys -import youtube_dl.extractor -from youtube_dl import YoutubeDL -from youtube_dl.compat import ( +import haruhi_dl.extractor +from haruhi_dl import HaruhiDL +from haruhi_dl.compat import ( compat_os_name, compat_str, ) -from youtube_dl.utils import ( +from haruhi_dl.utils import ( preferredencoding, write_string, ) @@ -61,7 +61,7 @@ def report_warning(message): sys.stderr.write(output) -class FakeYDL(YoutubeDL): +class FakeYDL(HaruhiDL): def __init__(self, override=None): # Different instances of the downloader can't share the same dictionary # some test set the "sublang" parameter, which would break the md5 checks. @@ -90,7 +90,7 @@ class FakeYDL(YoutubeDL): def gettestcases(include_onlymatching=False): - for ie in youtube_dl.extractor.gen_extractors(): + for ie in haruhi_dl.extractor.gen_extractors(): for tc in ie.get_testcases(include_onlymatching): yield tc @@ -192,7 +192,7 @@ def expect_info_dict(self, got_dict, expected_dict): if got_dict.get('_type') not in ('playlist', 'multi_video'): for key in ('id', 'url', 'title', 'ext'): self.assertTrue(got_dict.get(key), 'Missing mandatory field %s' % key) - # Check for mandatory fields that are automatically set by YoutubeDL + # Check for mandatory fields that are automatically set by HaruhiDL for key in ['webpage_url', 'extractor', 'extractor_key']: self.assertTrue(got_dict.get(key), 'Missing field: %s' % key) diff --git a/test/test_YoutubeDL.py b/test/test_HaruhiDL.py similarity index 97% rename from test/test_YoutubeDL.py rename to test/test_HaruhiDL.py index 1e204e551..62c21b817 100644 --- a/test/test_YoutubeDL.py +++ b/test/test_HaruhiDL.py @@ -12,12 +12,12 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import copy from test.helper import FakeYDL, assertRegexpMatches -from youtube_dl import YoutubeDL -from youtube_dl.compat import compat_str, compat_urllib_error -from youtube_dl.extractor import YoutubeIE -from youtube_dl.extractor.common import InfoExtractor -from youtube_dl.postprocessor.common import PostProcessor -from youtube_dl.utils import ExtractorError, match_filter_func +from haruhi_dl import HaruhiDL +from haruhi_dl.compat import compat_str, compat_urllib_error +from haruhi_dl.extractor import YoutubeIE +from haruhi_dl.extractor.common import InfoExtractor +from haruhi_dl.postprocessor.common import PostProcessor +from haruhi_dl.utils import ExtractorError, match_filter_func TEST_URL = 'http://localhost/sample.mp4' @@ -329,7 +329,7 @@ class TestFormatSelection(unittest.TestCase): # XXX: In real cases InfoExtractor._parse_mpd_formats() fills up 'acodec' # and 'vcodec', while in tests such information is incomplete since # commit a6c2c24479e5f4827ceb06f64d855329c0a6f593 - # test_YoutubeDL.test_youtube_format_selection is broken without + # test_HaruhiDL.test_youtube_format_selection is broken without # this fix if 'acodec' in info and 'vcodec' not in info: info['vcodec'] = 'none' @@ -411,7 +411,7 @@ class TestFormatSelection(unittest.TestCase): # For extractors with incomplete formats (all formats are audio-only or # video-only) best and worst should fallback to corresponding best/worst # video-only or audio-only formats (as per - # https://github.com/ytdl-org/youtube-dl/pull/5556) + # https://github.com/ytdl-org/haruhi-dl/pull/5556) formats = [ {'format_id': 'low', 'ext': 'mp3', 'preference': 1, 'vcodec': 'none', 'url': TEST_URL}, {'format_id': 'high', 'ext': 'mp3', 'preference': 2, 'vcodec': 'none', 'url': TEST_URL}, @@ -442,7 +442,7 @@ class TestFormatSelection(unittest.TestCase): self.assertRaises(ExtractorError, ydl.process_ie_result, info_dict.copy()) def test_format_selection_issue_10083(self): - # See https://github.com/ytdl-org/youtube-dl/issues/10083 + # See https://github.com/ytdl-org/haruhi-dl/issues/10083 formats = [ {'format_id': 'regular', 'height': 360, 'url': TEST_URL}, {'format_id': 'video', 'height': 720, 'acodec': 'none', 'url': TEST_URL}, @@ -550,7 +550,7 @@ class TestFormatSelection(unittest.TestCase): self.assertEqual(ydl._default_format_spec({'is_live': True}), 'best/bestvideo+bestaudio') -class TestYoutubeDL(unittest.TestCase): +class TestHaruhiDL(unittest.TestCase): def test_subtitles(self): def s_formats(lang, autocaption=False): return [{ @@ -633,7 +633,7 @@ class TestYoutubeDL(unittest.TestCase): } def fname(templ): - ydl = YoutubeDL({'outtmpl': templ}) + ydl = HaruhiDL({'outtmpl': templ}) return ydl.prepare_filename(info) self.assertEqual(fname('%(id)s.%(ext)s'), '1234.mp4') self.assertEqual(fname('%(id)s-%(width)s.%(ext)s'), '1234-NA.mp4') @@ -658,7 +658,7 @@ class TestYoutubeDL(unittest.TestCase): self.assertEqual(fname('Hello %(title2)s'), 'Hello %PATH%') def test_format_note(self): - ydl = YoutubeDL() + ydl = HaruhiDL() self.assertEqual(ydl._format_note({}), '') assertRegexpMatches(self, ydl._format_note({ 'vbr': 10, @@ -680,7 +680,7 @@ class TestYoutubeDL(unittest.TestCase): def run_pp(params, PP): with open(filename, 'wt') as f: f.write('EXAMPLE') - ydl = YoutubeDL(params) + ydl = HaruhiDL(params) ydl.add_post_processor(PP()) ydl.post_process(filename, {'filepath': filename}) @@ -856,7 +856,7 @@ class TestYoutubeDL(unittest.TestCase): result = get_ids({'playlist_items': '2-4,3-4,3'}) self.assertEqual(result, [2, 3, 4]) - # Tests for https://github.com/ytdl-org/youtube-dl/issues/10591 + # Tests for https://github.com/ytdl-org/haruhi-dl/issues/10591 # @{ result = get_downloaded_info_dicts({'playlist_items': '2-4,3-4,3'}) self.assertEqual(result[0]['playlist_index'], 2) @@ -873,7 +873,7 @@ class TestYoutubeDL(unittest.TestCase): # @} def test_urlopen_no_file_protocol(self): - # see https://github.com/ytdl-org/youtube-dl/issues/8227 + # see https://github.com/ytdl-org/haruhi-dl/issues/8227 ydl = YDL() self.assertRaises(compat_urllib_error.URLError, ydl.urlopen, 'file:///etc/passwd') diff --git a/test/test_YoutubeDLCookieJar.py b/test/test_HaruhiDLCookieJar.py similarity index 69% rename from test/test_YoutubeDLCookieJar.py rename to test/test_HaruhiDLCookieJar.py index 05f48bd74..634278f6c 100644 --- a/test/test_YoutubeDLCookieJar.py +++ b/test/test_HaruhiDLCookieJar.py @@ -10,27 +10,27 @@ import tempfile import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from youtube_dl.utils import YoutubeDLCookieJar +from haruhi_dl.utils import HaruhiDLCookieJar -class TestYoutubeDLCookieJar(unittest.TestCase): +class TestHaruhiDLCookieJar(unittest.TestCase): def test_keep_session_cookies(self): - cookiejar = YoutubeDLCookieJar('./test/testdata/cookies/session_cookies.txt') + cookiejar = HaruhiDLCookieJar('./test/testdata/cookies/session_cookies.txt') cookiejar.load(ignore_discard=True, ignore_expires=True) tf = tempfile.NamedTemporaryFile(delete=False) try: cookiejar.save(filename=tf.name, ignore_discard=True, ignore_expires=True) temp = tf.read().decode('utf-8') self.assertTrue(re.search( - r'www\.foobar\.foobar\s+FALSE\s+/\s+TRUE\s+0\s+YoutubeDLExpiresEmpty\s+YoutubeDLExpiresEmptyValue', temp)) + r'www\.foobar\.foobar\s+FALSE\s+/\s+TRUE\s+0\s+HaruhiDLExpiresEmpty\s+HaruhiDLExpiresEmptyValue', temp)) self.assertTrue(re.search( - r'www\.foobar\.foobar\s+FALSE\s+/\s+TRUE\s+0\s+YoutubeDLExpires0\s+YoutubeDLExpires0Value', temp)) + r'www\.foobar\.foobar\s+FALSE\s+/\s+TRUE\s+0\s+HaruhiDLExpires0\s+HaruhiDLExpires0Value', temp)) finally: tf.close() os.remove(tf.name) def test_strip_httponly_prefix(self): - cookiejar = YoutubeDLCookieJar('./test/testdata/cookies/httponly_cookies.txt') + cookiejar = HaruhiDLCookieJar('./test/testdata/cookies/httponly_cookies.txt') cookiejar.load(ignore_discard=True, ignore_expires=True) def assert_cookie_has_value(key): @@ -40,7 +40,7 @@ class TestYoutubeDLCookieJar(unittest.TestCase): assert_cookie_has_value('JS_ACCESSIBLE_COOKIE') def test_malformed_cookies(self): - cookiejar = YoutubeDLCookieJar('./test/testdata/cookies/malformed_cookies.txt') + cookiejar = HaruhiDLCookieJar('./test/testdata/cookies/malformed_cookies.txt') cookiejar.load(ignore_discard=True, ignore_expires=True) # Cookies should be empty since all malformed cookie file entries # will be ignored diff --git a/test/test_InfoExtractor.py b/test/test_InfoExtractor.py index 71f6608fe..393917876 100644 --- a/test/test_InfoExtractor.py +++ b/test/test_InfoExtractor.py @@ -10,10 +10,10 @@ import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import FakeYDL, expect_dict, expect_value, http_server_port -from youtube_dl.compat import compat_etree_fromstring, compat_http_server -from youtube_dl.extractor.common import InfoExtractor -from youtube_dl.extractor import YoutubeIE, get_info_extractor -from youtube_dl.utils import encode_data_uri, strip_jsonp, ExtractorError, RegexNotFoundError +from haruhi_dl.compat import compat_etree_fromstring, compat_http_server +from haruhi_dl.extractor.common import InfoExtractor +from haruhi_dl.extractor import YoutubeIE, get_info_extractor +from haruhi_dl.utils import encode_data_uri, strip_jsonp, ExtractorError, RegexNotFoundError import threading @@ -379,7 +379,7 @@ jwplayer("mediaplayer").setup({"abouttext":"Visit Indie DB","aboutlink":"http:\/ def test_parse_m3u8_formats(self): _TEST_CASES = [ ( - # https://github.com/ytdl-org/youtube-dl/issues/11507 + # https://github.com/ytdl-org/haruhi-dl/issues/11507 # http://pluzz.francetv.fr/videos/le_ministere.html 'pluzz_francetv_11507', 'http://replayftv-vh.akamaihd.net/i/streaming-adaptatif_france-dom-tom/2017/S16/J2/156589847-58f59130c1f52-,standard1,standard2,standard3,standard4,standard5,.mp4.csmil/master.m3u8?caption=2017%2F16%2F156589847-1492488987.m3u8%3Afra%3AFrancais&audiotrack=0%3Afra%3AFrancais', @@ -441,7 +441,7 @@ jwplayer("mediaplayer").setup({"abouttext":"Visit Indie DB","aboutlink":"http:\/ }] ), ( - # https://github.com/ytdl-org/youtube-dl/issues/11995 + # https://github.com/ytdl-org/haruhi-dl/issues/11995 # http://teamcoco.com/video/clueless-gamer-super-bowl-for-honor 'teamcoco_11995', 'http://ak.storage-w.teamcococdn.com/cdn/2017-02/98599/ed8f/main.m3u8', @@ -515,7 +515,7 @@ jwplayer("mediaplayer").setup({"abouttext":"Visit Indie DB","aboutlink":"http:\/ }] ), ( - # https://github.com/ytdl-org/youtube-dl/issues/12211 + # https://github.com/ytdl-org/haruhi-dl/issues/12211 # http://video.toggle.sg/en/series/whoopie-s-world/ep3/478601 'toggle_mobile_12211', 'http://cdnapi.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/http/entryId/0_89q6e8ku/format/applehttp/tags/mobile_sd/f/a.m3u8', @@ -679,7 +679,7 @@ jwplayer("mediaplayer").setup({"abouttext":"Visit Indie DB","aboutlink":"http:\/ }] ), ( - # https://github.com/ytdl-org/youtube-dl/issues/18923 + # https://github.com/ytdl-org/haruhi-dl/issues/18923 # https://www.ted.com/talks/boris_hesser_a_grassroots_healthcare_revolution_in_africa 'ted_18923', 'http://hls.ted.com/talks/31241.m3u8', @@ -748,9 +748,9 @@ jwplayer("mediaplayer").setup({"abouttext":"Visit Indie DB","aboutlink":"http:\/ def test_parse_mpd_formats(self): _TEST_CASES = [ ( - # https://github.com/ytdl-org/youtube-dl/issues/13919 + # https://github.com/ytdl-org/haruhi-dl/issues/13919 # Also tests duplicate representation ids, see - # https://github.com/ytdl-org/youtube-dl/issues/15111 + # https://github.com/ytdl-org/haruhi-dl/issues/15111 'float_duration', 'http://unknown/manifest.mpd', # mpd_url None, # mpd_base_url @@ -831,7 +831,7 @@ jwplayer("mediaplayer").setup({"abouttext":"Visit Indie DB","aboutlink":"http:\/ 'height': 1080, }] ), ( - # https://github.com/ytdl-org/youtube-dl/pull/14844 + # https://github.com/ytdl-org/haruhi-dl/pull/14844 'urls_only', 'http://unknown/manifest.mpd', # mpd_url None, # mpd_base_url @@ -914,7 +914,7 @@ jwplayer("mediaplayer").setup({"abouttext":"Visit Indie DB","aboutlink":"http:\/ 'height': 1080, }] ), ( - # https://github.com/ytdl-org/youtube-dl/issues/20346 + # https://github.com/ytdl-org/haruhi-dl/issues/20346 # Media considered unfragmented even though it contains # Initialization tag 'unfragmented', @@ -974,7 +974,7 @@ jwplayer("mediaplayer").setup({"abouttext":"Visit Indie DB","aboutlink":"http:\/ def test_parse_f4m_formats(self): _TEST_CASES = [ ( - # https://github.com/ytdl-org/youtube-dl/issues/14660 + # https://github.com/ytdl-org/haruhi-dl/issues/14660 'custom_base_url', 'http://api.new.livestream.com/accounts/6115179/events/6764928/videos/144884262.f4m', [{ diff --git a/test/test_aes.py b/test/test_aes.py index cc89fb6ab..76d4b9d46 100644 --- a/test/test_aes.py +++ b/test/test_aes.py @@ -8,8 +8,8 @@ import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from youtube_dl.aes import aes_decrypt, aes_encrypt, aes_cbc_decrypt, aes_cbc_encrypt, aes_decrypt_text -from youtube_dl.utils import bytes_to_intlist, intlist_to_bytes +from haruhi_dl.aes import aes_decrypt, aes_encrypt, aes_cbc_decrypt, aes_cbc_encrypt, aes_decrypt_text +from haruhi_dl.utils import bytes_to_intlist, intlist_to_bytes import base64 # the encrypted data can be generate with 'devscripts/generate_aes_testdata.py' diff --git a/test/test_age_restriction.py b/test/test_age_restriction.py index 6f5513faa..608079ee8 100644 --- a/test/test_age_restriction.py +++ b/test/test_age_restriction.py @@ -10,7 +10,7 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import try_rm -from youtube_dl import YoutubeDL +from haruhi_dl import HaruhiDL def _download_restricted(url, filename, age): @@ -22,7 +22,7 @@ def _download_restricted(url, filename, age): 'writeinfojson': True, 'outtmpl': '%(id)s.%(ext)s', } - ydl = YoutubeDL(params) + ydl = HaruhiDL(params) ydl.add_default_info_extractors() json_filename = os.path.splitext(filename)[0] + '.info.json' try_rm(json_filename) diff --git a/test/test_all_urls.py b/test/test_all_urls.py index 81056a999..1ca459d42 100644 --- a/test/test_all_urls.py +++ b/test/test_all_urls.py @@ -12,7 +12,7 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import gettestcases -from youtube_dl.extractor import ( +from haruhi_dl.extractor import ( FacebookIE, gen_extractors, YoutubeIE, @@ -70,7 +70,7 @@ class TestAllURLsMatching(unittest.TestCase): def test_youtube_search_matching(self): self.assertMatch('http://www.youtube.com/results?search_query=making+mustard', ['youtube:search_url']) - self.assertMatch('https://www.youtube.com/results?baz=bar&search_query=youtube-dl+test+video&filters=video&lclk=video', ['youtube:search_url']) + self.assertMatch('https://www.youtube.com/results?baz=bar&search_query=haruhi-dl+test+video&filters=video&lclk=video', ['youtube:search_url']) def test_youtube_extract(self): assertExtractId = lambda url, id: self.assertEqual(YoutubeIE.extract_id(url), id) @@ -110,7 +110,7 @@ class TestAllURLsMatching(unittest.TestCase): self.assertMatch('https://vimeo.com/user7108434/videos', ['vimeo:user']) self.assertMatch('https://vimeo.com/user21297594/review/75524534/3c257a1b5d', ['vimeo:review']) - # https://github.com/ytdl-org/youtube-dl/issues/1930 + # https://github.com/ytdl-org/haruhi-dl/issues/1930 def test_soundcloud_not_matching_sets(self): self.assertMatch('http://soundcloud.com/floex/sets/gone-ep', ['soundcloud:set']) @@ -119,7 +119,7 @@ class TestAllURLsMatching(unittest.TestCase): self.assertMatch('http://tatianamaslanydaily.tumblr.com/post/54196191430', ['Tumblr']) def test_pbs(self): - # https://github.com/ytdl-org/youtube-dl/issues/2350 + # https://github.com/ytdl-org/haruhi-dl/issues/2350 self.assertMatch('http://video.pbs.org/viralplayer/2365173446/', ['pbs']) self.assertMatch('http://video.pbs.org/widget/partnerplayer/980042464/', ['pbs']) diff --git a/test/test_cache.py b/test/test_cache.py index a16160142..3e68a51a3 100644 --- a/test/test_cache.py +++ b/test/test_cache.py @@ -13,7 +13,7 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import FakeYDL -from youtube_dl.cache import Cache +from haruhi_dl.cache import Cache def _is_empty(d): diff --git a/test/test_compat.py b/test/test_compat.py index 86ff389fd..88c3b87c8 100644 --- a/test/test_compat.py +++ b/test/test_compat.py @@ -10,7 +10,7 @@ import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from youtube_dl.compat import ( +from haruhi_dl.compat import ( compat_getenv, compat_setenv, compat_etree_Element, @@ -46,11 +46,11 @@ class TestCompat(unittest.TestCase): compat_setenv('HOME', old_home or '') def test_all_present(self): - import youtube_dl.compat - all_names = youtube_dl.compat.__all__ + import haruhi_dl.compat + all_names = haruhi_dl.compat.__all__ present_names = set(filter( lambda c: '_' in c and not c.startswith('_'), - dir(youtube_dl.compat))) - set(['unicode_literals']) + dir(haruhi_dl.compat))) - set(['unicode_literals']) self.assertEqual(all_names, sorted(present_names)) def test_compat_urllib_parse_unquote(self): diff --git a/test/test_download.py b/test/test_download.py index ebe820dfc..ea406b85b 100644 --- a/test/test_download.py +++ b/test/test_download.py @@ -24,28 +24,28 @@ import io import json import socket -import youtube_dl.YoutubeDL -from youtube_dl.compat import ( +import haruhi_dl.HaruhiDL +from haruhi_dl.compat import ( compat_http_client, compat_urllib_error, compat_HTTPError, ) -from youtube_dl.utils import ( +from haruhi_dl.utils import ( DownloadError, ExtractorError, format_bytes, UnavailableVideoError, ) -from youtube_dl.extractor import get_info_extractor +from haruhi_dl.extractor import get_info_extractor RETRIES = 3 -class YoutubeDL(youtube_dl.YoutubeDL): +class HaruhiDL(haruhi_dl.HaruhiDL): def __init__(self, *args, **kwargs): self.to_stderr = self.to_screen self.processed_info_dicts = [] - super(YoutubeDL, self).__init__(*args, **kwargs) + super(HaruhiDL, self).__init__(*args, **kwargs) def report_warning(self, message): # Don't accept warnings during tests @@ -53,7 +53,7 @@ class YoutubeDL(youtube_dl.YoutubeDL): def process_info(self, info_dict): self.processed_info_dicts.append(info_dict) - return super(YoutubeDL, self).process_info(info_dict) + return super(HaruhiDL, self).process_info(info_dict) def _file_md5(fn): @@ -92,7 +92,7 @@ class TestDownload(unittest.TestCase): def generator(test_case, tname): def test_template(self): - ie = youtube_dl.extractor.get_info_extractor(test_case['name'])() + ie = haruhi_dl.extractor.get_info_extractor(test_case['name'])() other_ies = [get_info_extractor(ie_key)() for ie_key in test_case.get('add_ie', [])] is_playlist = any(k.startswith('playlist') for k in test_case) test_cases = test_case.get( @@ -123,7 +123,7 @@ def generator(test_case, tname): params.setdefault('extract_flat', 'in_playlist') params.setdefault('skip_download', True) - ydl = YoutubeDL(params, auto_init=False) + ydl = HaruhiDL(params, auto_init=False) ydl.add_default_info_extractors() finished_hook_called = set() diff --git a/test/test_downloader_http.py b/test/test_downloader_http.py index 750472281..3bfc6dea4 100644 --- a/test/test_downloader_http.py +++ b/test/test_downloader_http.py @@ -10,10 +10,10 @@ import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import http_server_port, try_rm -from youtube_dl import YoutubeDL -from youtube_dl.compat import compat_http_server -from youtube_dl.downloader.http import HttpFD -from youtube_dl.utils import encodeFilename +from haruhi_dl import HaruhiDL +from haruhi_dl.compat import compat_http_server +from haruhi_dl.downloader.http import HttpFD +from haruhi_dl.utils import encodeFilename import threading TEST_DIR = os.path.dirname(os.path.abspath(__file__)) @@ -88,7 +88,7 @@ class TestHttpFD(unittest.TestCase): def download(self, params, ep): params['logger'] = FakeLogger() - ydl = YoutubeDL(params) + ydl = HaruhiDL(params) downloader = HttpFD(ydl, params) filename = 'testfile.mp4' try_rm(encodeFilename(filename)) diff --git a/test/test_execution.py b/test/test_execution.py index 11661bb68..78a3e4559 100644 --- a/test/test_execution.py +++ b/test/test_execution.py @@ -10,7 +10,7 @@ import os import subprocess sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from youtube_dl.utils import encodeArgument +from haruhi_dl.utils import encodeArgument rootDir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -23,18 +23,18 @@ except AttributeError: class TestExecution(unittest.TestCase): def test_import(self): - subprocess.check_call([sys.executable, '-c', 'import youtube_dl'], cwd=rootDir) + subprocess.check_call([sys.executable, '-c', 'import haruhi_dl'], cwd=rootDir) def test_module_exec(self): if sys.version_info >= (2, 7): # Python 2.6 doesn't support package execution - subprocess.check_call([sys.executable, '-m', 'youtube_dl', '--version'], cwd=rootDir, stdout=_DEV_NULL) + subprocess.check_call([sys.executable, '-m', 'haruhi_dl', '--version'], cwd=rootDir, stdout=_DEV_NULL) def test_main_exec(self): - subprocess.check_call([sys.executable, 'youtube_dl/__main__.py', '--version'], cwd=rootDir, stdout=_DEV_NULL) + subprocess.check_call([sys.executable, 'haruhi_dl/__main__.py', '--version'], cwd=rootDir, stdout=_DEV_NULL) def test_cmdline_umlauts(self): p = subprocess.Popen( - [sys.executable, 'youtube_dl/__main__.py', encodeArgument('ä'), '--version'], + [sys.executable, 'haruhi_dl/__main__.py', encodeArgument('ä'), '--version'], cwd=rootDir, stdout=_DEV_NULL, stderr=subprocess.PIPE) _, stderr = p.communicate() self.assertFalse(stderr) diff --git a/test/test_http.py b/test/test_http.py index 3ee0a5dda..27a4712b2 100644 --- a/test/test_http.py +++ b/test/test_http.py @@ -9,8 +9,8 @@ import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import http_server_port -from youtube_dl import YoutubeDL -from youtube_dl.compat import compat_http_server, compat_urllib_request +from haruhi_dl import HaruhiDL +from haruhi_dl.compat import compat_http_server, compat_urllib_request import ssl import threading @@ -77,7 +77,7 @@ class TestHTTP(unittest.TestCase): if sys.version_info[0] == 3: return - ydl = YoutubeDL({'logger': FakeLogger()}) + ydl = HaruhiDL({'logger': FakeLogger()}) r = ydl.extract_info('http://127.0.0.1:%d/302' % self.port) self.assertEqual(r['entries'][0]['url'], 'http://127.0.0.1:%d/vid.mp4' % self.port) @@ -96,12 +96,12 @@ class TestHTTPS(unittest.TestCase): def test_nocheckcertificate(self): if sys.version_info >= (2, 7, 9): # No certificate checking anyways - ydl = YoutubeDL({'logger': FakeLogger()}) + ydl = HaruhiDL({'logger': FakeLogger()}) self.assertRaises( Exception, ydl.extract_info, 'https://127.0.0.1:%d/video.html' % self.port) - ydl = YoutubeDL({'logger': FakeLogger(), 'nocheckcertificate': True}) + ydl = HaruhiDL({'logger': FakeLogger(), 'nocheckcertificate': True}) r = ydl.extract_info('https://127.0.0.1:%d/video.html' % self.port) self.assertEqual(r['entries'][0]['url'], 'https://127.0.0.1:%d/vid.mp4' % self.port) @@ -139,7 +139,7 @@ class TestProxy(unittest.TestCase): def test_proxy(self): geo_proxy = '127.0.0.1:{0}'.format(self.geo_port) - ydl = YoutubeDL({ + ydl = HaruhiDL({ 'proxy': '127.0.0.1:{0}'.format(self.port), 'geo_verification_proxy': geo_proxy, }) @@ -153,7 +153,7 @@ class TestProxy(unittest.TestCase): self.assertEqual(response, 'geo: {0}'.format(url)) def test_proxy_with_idn(self): - ydl = YoutubeDL({ + ydl = HaruhiDL({ 'proxy': '127.0.0.1:{0}'.format(self.port), }) url = 'http://中文.tw/' diff --git a/test/test_iqiyi_sdk_interpreter.py b/test/test_iqiyi_sdk_interpreter.py index 789059dbe..d0fb567ac 100644 --- a/test/test_iqiyi_sdk_interpreter.py +++ b/test/test_iqiyi_sdk_interpreter.py @@ -9,7 +9,7 @@ import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import FakeYDL -from youtube_dl.extractor import IqiyiIE +from haruhi_dl.extractor import IqiyiIE class IqiyiIEWithCredentials(IqiyiIE): diff --git a/test/test_jsinterp.py b/test/test_jsinterp.py deleted file mode 100644 index c24b8ca74..000000000 --- a/test/test_jsinterp.py +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env python - -from __future__ import unicode_literals - -# Allow direct execution -import os -import sys -import unittest -sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) - -from youtube_dl.jsinterp import JSInterpreter - - -class TestJSInterpreter(unittest.TestCase): - def test_basic(self): - jsi = JSInterpreter('function x(){;}') - self.assertEqual(jsi.call_function('x'), None) - - jsi = JSInterpreter('function x3(){return 42;}') - self.assertEqual(jsi.call_function('x3'), 42) - - jsi = JSInterpreter('var x5 = function(){return 42;}') - self.assertEqual(jsi.call_function('x5'), 42) - - def test_calc(self): - jsi = JSInterpreter('function x4(a){return 2*a+1;}') - self.assertEqual(jsi.call_function('x4', 3), 7) - - def test_empty_return(self): - jsi = JSInterpreter('function f(){return; y()}') - self.assertEqual(jsi.call_function('f'), None) - - def test_morespace(self): - jsi = JSInterpreter('function x (a) { return 2 * a + 1 ; }') - self.assertEqual(jsi.call_function('x', 3), 7) - - jsi = JSInterpreter('function f () { x = 2 ; return x; }') - self.assertEqual(jsi.call_function('f'), 2) - - def test_strange_chars(self): - jsi = JSInterpreter('function $_xY1 ($_axY1) { var $_axY2 = $_axY1 + 1; return $_axY2; }') - self.assertEqual(jsi.call_function('$_xY1', 20), 21) - - def test_operators(self): - jsi = JSInterpreter('function f(){return 1 << 5;}') - self.assertEqual(jsi.call_function('f'), 32) - - jsi = JSInterpreter('function f(){return 19 & 21;}') - self.assertEqual(jsi.call_function('f'), 17) - - jsi = JSInterpreter('function f(){return 11 >> 2;}') - self.assertEqual(jsi.call_function('f'), 2) - - def test_array_access(self): - jsi = JSInterpreter('function f(){var x = [1,2,3]; x[0] = 4; x[0] = 5; x[2] = 7; return x;}') - self.assertEqual(jsi.call_function('f'), [5, 2, 7]) - - def test_parens(self): - jsi = JSInterpreter('function f(){return (1) + (2) * ((( (( (((((3)))))) )) ));}') - self.assertEqual(jsi.call_function('f'), 7) - - jsi = JSInterpreter('function f(){return (1 + 2) * 3;}') - self.assertEqual(jsi.call_function('f'), 9) - - def test_assignments(self): - jsi = JSInterpreter('function f(){var x = 20; x = 30 + 1; return x;}') - self.assertEqual(jsi.call_function('f'), 31) - - jsi = JSInterpreter('function f(){var x = 20; x += 30 + 1; return x;}') - self.assertEqual(jsi.call_function('f'), 51) - - jsi = JSInterpreter('function f(){var x = 20; x -= 30 + 1; return x;}') - self.assertEqual(jsi.call_function('f'), -11) - - def test_comments(self): - 'Skipping: Not yet fully implemented' - return - jsi = JSInterpreter(''' - function x() { - var x = /* 1 + */ 2; - var y = /* 30 - * 40 */ 50; - return x + y; - } - ''') - self.assertEqual(jsi.call_function('x'), 52) - - jsi = JSInterpreter(''' - function f() { - var x = "/*"; - var y = 1 /* comment */ + 2; - return y; - } - ''') - self.assertEqual(jsi.call_function('f'), 3) - - def test_precedence(self): - jsi = JSInterpreter(''' - function x() { - var a = [10, 20, 30, 40, 50]; - var b = 6; - a[0]=a[b%a.length]; - return a; - }''') - self.assertEqual(jsi.call_function('x'), [20, 20, 30, 40, 50]) - - def test_call(self): - jsi = JSInterpreter(''' - function x() { return 2; } - function y(a) { return x() + a; } - function z() { return y(3); } - ''') - self.assertEqual(jsi.call_function('z'), 5) - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_netrc.py b/test/test_netrc.py index 7cf3a6a2e..8b37e5a85 100644 --- a/test/test_netrc.py +++ b/test/test_netrc.py @@ -7,7 +7,7 @@ import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from youtube_dl.extractor import ( +from haruhi_dl.extractor import ( gen_extractors, ) diff --git a/test/test_options.py b/test/test_options.py index 3a25a6ba3..8c874af2b 100644 --- a/test/test_options.py +++ b/test/test_options.py @@ -8,7 +8,7 @@ import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from youtube_dl.options import _hide_login_info +from haruhi_dl.options import _hide_login_info class TestOptions(unittest.TestCase): diff --git a/test/test_postprocessors.py b/test/test_postprocessors.py index 4209d1d9a..9eab3539f 100644 --- a/test/test_postprocessors.py +++ b/test/test_postprocessors.py @@ -8,7 +8,7 @@ import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from youtube_dl.postprocessor import MetadataFromTitlePP +from haruhi_dl.postprocessor import MetadataFromTitlePP class TestMetadataFromTitle(unittest.TestCase): diff --git a/test/test_socks.py b/test/test_socks.py index 1e68eb0da..6938b5101 100644 --- a/test/test_socks.py +++ b/test/test_socks.py @@ -15,7 +15,7 @@ from test.helper import ( FakeYDL, get_params, ) -from youtube_dl.compat import ( +from haruhi_dl.compat import ( compat_str, compat_urllib_request, ) diff --git a/test/test_subtitles.py b/test/test_subtitles.py index 17aaaf20d..ec47c55cb 100644 --- a/test/test_subtitles.py +++ b/test/test_subtitles.py @@ -10,7 +10,7 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import FakeYDL, md5 -from youtube_dl.extractor import ( +from haruhi_dl.extractor import ( YoutubeIE, DailymotionIE, TEDIE, diff --git a/test/test_swfinterp.py b/test/test_swfinterp.py deleted file mode 100644 index 9f18055e6..000000000 --- a/test/test_swfinterp.py +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env python -from __future__ import unicode_literals - -# Allow direct execution -import os -import sys -import unittest -sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) - - -import errno -import io -import json -import re -import subprocess - -from youtube_dl.swfinterp import SWFInterpreter - - -TEST_DIR = os.path.join( - os.path.dirname(os.path.abspath(__file__)), 'swftests') - - -class TestSWFInterpreter(unittest.TestCase): - pass - - -def _make_testfunc(testfile): - m = re.match(r'^(.*)\.(as)$', testfile) - if not m: - return - test_id = m.group(1) - - def test_func(self): - as_file = os.path.join(TEST_DIR, testfile) - swf_file = os.path.join(TEST_DIR, test_id + '.swf') - if ((not os.path.exists(swf_file)) - or os.path.getmtime(swf_file) < os.path.getmtime(as_file)): - # Recompile - try: - subprocess.check_call([ - 'mxmlc', '-output', swf_file, - '-static-link-runtime-shared-libraries', as_file]) - except OSError as ose: - if ose.errno == errno.ENOENT: - print('mxmlc not found! Skipping test.') - return - raise - - with open(swf_file, 'rb') as swf_f: - swf_content = swf_f.read() - swfi = SWFInterpreter(swf_content) - - with io.open(as_file, 'r', encoding='utf-8') as as_f: - as_content = as_f.read() - - def _find_spec(key): - m = re.search( - r'(?m)^//\s*%s:\s*(.*?)\n' % re.escape(key), as_content) - if not m: - raise ValueError('Cannot find %s in %s' % (key, testfile)) - return json.loads(m.group(1)) - - input_args = _find_spec('input') - output = _find_spec('output') - - swf_class = swfi.extract_class(test_id) - func = swfi.extract_function(swf_class, 'main') - res = func(input_args) - self.assertEqual(res, output) - - test_func.__name__ = str('test_swf_' + test_id) - setattr(TestSWFInterpreter, test_func.__name__, test_func) - - -for testfile in os.listdir(TEST_DIR): - _make_testfunc(testfile) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_update.py b/test/test_update.py index d9c71511d..9b73ce45c 100644 --- a/test/test_update.py +++ b/test/test_update.py @@ -10,7 +10,7 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import json -from youtube_dl.update import rsa_verify +from haruhi_dl.update import rsa_verify class TestUpdate(unittest.TestCase): diff --git a/test/test_utils.py b/test/test_utils.py index c2d1e4fb1..93c6f2bf3 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -15,7 +15,7 @@ import io import json import xml.etree.ElementTree -from youtube_dl.utils import ( +from haruhi_dl.utils import ( age_restricted, args_to_str, encode_base_n, @@ -105,7 +105,7 @@ from youtube_dl.utils import ( cli_bool_option, parse_codecs, ) -from youtube_dl.compat import ( +from haruhi_dl.compat import ( compat_chr, compat_etree_fromstring, compat_getenv, @@ -1396,7 +1396,7 @@ Line 1 self.assertEqual(caesar('ebg', 'acegik', -2), 'abc') def test_rot47(self): - self.assertEqual(rot47('youtube-dl'), r'J@FEF36\5=') + self.assertEqual(rot47('haruhi-dl'), r'J@FEF36\5=') self.assertEqual(rot47('YOUTUBE-DL'), r'*~&%&qt\s{') def test_urshift(self): diff --git a/test/test_verbose_output.py b/test/test_verbose_output.py index c1465fe8c..6396d433d 100644 --- a/test/test_verbose_output.py +++ b/test/test_verbose_output.py @@ -17,7 +17,7 @@ class TestVerboseOutput(unittest.TestCase): def test_private_info_arg(self): outp = subprocess.Popen( [ - sys.executable, 'youtube_dl/__main__.py', '-v', + sys.executable, 'haruhi_dl/__main__.py', '-v', '--username', 'johnsmith@gmail.com', '--password', 'secret', ], cwd=rootDir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) @@ -30,7 +30,7 @@ class TestVerboseOutput(unittest.TestCase): def test_private_info_shortarg(self): outp = subprocess.Popen( [ - sys.executable, 'youtube_dl/__main__.py', '-v', + sys.executable, 'haruhi_dl/__main__.py', '-v', '-u', 'johnsmith@gmail.com', '-p', 'secret', ], cwd=rootDir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) @@ -43,7 +43,7 @@ class TestVerboseOutput(unittest.TestCase): def test_private_info_eq(self): outp = subprocess.Popen( [ - sys.executable, 'youtube_dl/__main__.py', '-v', + sys.executable, 'haruhi_dl/__main__.py', '-v', '--username=johnsmith@gmail.com', '--password=secret', ], cwd=rootDir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) @@ -56,7 +56,7 @@ class TestVerboseOutput(unittest.TestCase): def test_private_info_shortarg_eq(self): outp = subprocess.Popen( [ - sys.executable, 'youtube_dl/__main__.py', '-v', + sys.executable, 'haruhi_dl/__main__.py', '-v', '-u=johnsmith@gmail.com', '-p=secret', ], cwd=rootDir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) diff --git a/test/test_write_annotations.py b/test/test_write_annotations.py index 41abdfe3b..ea2dcdd88 100644 --- a/test/test_write_annotations.py +++ b/test/test_write_annotations.py @@ -15,13 +15,13 @@ import io import xml.etree.ElementTree -import youtube_dl.YoutubeDL -import youtube_dl.extractor +import haruhi_dl.HaruhiDL +import haruhi_dl.extractor -class YoutubeDL(youtube_dl.YoutubeDL): +class HaruhiDL(haruhi_dl.HaruhiDL): def __init__(self, *args, **kwargs): - super(YoutubeDL, self).__init__(*args, **kwargs) + super(HaruhiDL, self).__init__(*args, **kwargs) self.to_stderr = self.to_screen @@ -45,8 +45,8 @@ class TestAnnotations(unittest.TestCase): def test_info_json(self): expected = list(EXPECTED_ANNOTATIONS) # Two annotations could have the same text. - ie = youtube_dl.extractor.YoutubeIE() - ydl = YoutubeDL(params) + ie = haruhi_dl.extractor.YoutubeIE() + ydl = HaruhiDL(params) ydl.add_info_extractor(ie) ydl.download([TEST_ID]) self.assertTrue(os.path.exists(ANNOTATIONS_FILE)) diff --git a/test/test_youtube_chapters.py b/test/test_youtube_chapters.py index e69c57377..9a56ec851 100644 --- a/test/test_youtube_chapters.py +++ b/test/test_youtube_chapters.py @@ -9,7 +9,7 @@ import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import expect_value -from youtube_dl.extractor import YoutubeIE +from haruhi_dl.extractor import YoutubeIE class TestYoutubeChapters(unittest.TestCase): diff --git a/test/test_youtube_lists.py b/test/test_youtube_lists.py index c4f0abbea..0dadf218d 100644 --- a/test/test_youtube_lists.py +++ b/test/test_youtube_lists.py @@ -10,7 +10,7 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import FakeYDL -from youtube_dl.extractor import ( +from haruhi_dl.extractor import ( YoutubePlaylistIE, YoutubeIE, ) diff --git a/test/test_youtube_signature.py b/test/test_youtube_signature.py index 69df30eda..eed0b4dc1 100644 --- a/test/test_youtube_signature.py +++ b/test/test_youtube_signature.py @@ -13,8 +13,8 @@ import re import string from test.helper import FakeYDL -from youtube_dl.extractor import YoutubeIE -from youtube_dl.compat import compat_str, compat_urlretrieve +from haruhi_dl.extractor import YoutubeIE +from haruhi_dl.compat import compat_str, compat_urlretrieve _TESTS = [ ( diff --git a/test/testdata/cookies/session_cookies.txt b/test/testdata/cookies/session_cookies.txt index f6996f031..464228a3a 100644 --- a/test/testdata/cookies/session_cookies.txt +++ b/test/testdata/cookies/session_cookies.txt @@ -2,5 +2,5 @@ # http://curl.haxx.se/rfc/cookie_spec.html # This is a generated file! Do not edit. -www.foobar.foobar FALSE / TRUE YoutubeDLExpiresEmpty YoutubeDLExpiresEmptyValue -www.foobar.foobar FALSE / TRUE 0 YoutubeDLExpires0 YoutubeDLExpires0Value +www.foobar.foobar FALSE / TRUE HaruhiDLExpiresEmpty HaruhiDLExpiresEmptyValue +www.foobar.foobar FALSE / TRUE 0 HaruhiDLExpires0 HaruhiDLExpires0Value diff --git a/test/versions.json b/test/versions.json index 6cccc2259..2663b795e 100644 --- a/test/versions.json +++ b/test/versions.json @@ -4,29 +4,29 @@ "versions": { "2013.01.02": { "bin": [ - "http://youtube-dl.org/downloads/2013.01.02/youtube-dl", + "http://haruhi-dl.org/downloads/2013.01.02/haruhi-dl", "f5b502f8aaa77675c4884938b1e4871ebca2611813a0c0e74f60c0fbd6dcca6b" ], "exe": [ - "http://youtube-dl.org/downloads/2013.01.02/youtube-dl.exe", + "http://haruhi-dl.org/downloads/2013.01.02/haruhi-dl.exe", "75fa89d2ce297d102ff27675aa9d92545bbc91013f52ec52868c069f4f9f0422" ], "tar": [ - "http://youtube-dl.org/downloads/2013.01.02/youtube-dl-2013.01.02.tar.gz", + "http://haruhi-dl.org/downloads/2013.01.02/haruhi-dl-2013.01.02.tar.gz", "6a66d022ac8e1c13da284036288a133ec8dba003b7bd3a5179d0c0daca8c8196" ] }, "2013.01.06": { "bin": [ - "http://youtube-dl.org/downloads/2013.01.06/youtube-dl", + "http://haruhi-dl.org/downloads/2013.01.06/haruhi-dl", "64b6ed8865735c6302e836d4d832577321b4519aa02640dc508580c1ee824049" ], "exe": [ - "http://youtube-dl.org/downloads/2013.01.06/youtube-dl.exe", + "http://haruhi-dl.org/downloads/2013.01.06/haruhi-dl.exe", "58609baf91e4389d36e3ba586e21dab882daaaee537e4448b1265392ae86ff84" ], "tar": [ - "http://youtube-dl.org/downloads/2013.01.06/youtube-dl-2013.01.06.tar.gz", + "http://haruhi-dl.org/downloads/2013.01.06/haruhi-dl-2013.01.06.tar.gz", "fe77ab20a95d980ed17a659aa67e371fdd4d656d19c4c7950e7b720b0c2f1a86" ] } diff --git a/tox.ini b/tox.ini index 9c4e4a3d1..050d35711 100644 --- a/tox.ini +++ b/tox.ini @@ -10,5 +10,5 @@ defaultargs = test --exclude test_download.py --exclude test_age_restriction.py --exclude test_subtitles.py --exclude test_write_annotations.py --exclude test_youtube_lists.py --exclude test_iqiyi_sdk_interpreter.py --exclude test_socks.py -commands = nosetests --verbose {posargs:{[testenv]defaultargs}} # --with-coverage --cover-package=youtube_dl --cover-html +commands = nosetests --verbose {posargs:{[testenv]defaultargs}} # --with-coverage --cover-package=haruhi_dl --cover-html # test.test_download:TestDownload.test_NowVideo