youtube-dl/test
Kevin O'Connor 4eda10499e
[utils] Don't attempt to coerce JS strings to numbers in js_to_json (#26851)
The current logic in `js_to_json` tries to rewrite octal/hex numbers to
decimal. However, when the logic actually happens the `"` or `'` have
already been trimmed off. This causes what were originally strings, that
happen to look like octal/hex numbers, to get rewritten to decimal and
returned as a number rather than a string.

In practive something like:

```js
{
  "0x40": "foo",
  "040": "bar",
}
```

would get rewritten as:

```json
{
  64: "foo",
  32: "bar
}
```

This is problematic since this isn't valid JSON as you cannot have
non-string keys.
2020-10-18 00:10:41 +07:00
..
swftests
testdata [utils] Improve cookie files support 2020-05-05 04:21:25 +07:00
__init__.py
helper.py
parameters.json
test_InfoExtractor.py
test_YoutubeDL.py [test_YoutubeDL] Add tests for #10591 (closes #23873) 2020-02-15 03:37:31 +07:00
test_YoutubeDLCookieJar.py [utils] Improve cookie files support 2020-05-05 04:21:25 +07:00
test_aes.py
test_age_restriction.py
test_all_urls.py [yahoo] restore support for cbs suffixed URLs 2019-10-31 07:38:53 +01:00
test_cache.py
test_compat.py
test_download.py
test_downloader_http.py
test_execution.py
test_http.py
test_iqiyi_sdk_interpreter.py
test_jsinterp.py
test_netrc.py
test_options.py
test_postprocessors.py
test_socks.py
test_subtitles.py [test_subtitles] Remove obsolete test 2020-02-29 22:08:43 +07:00
test_swfinterp.py
test_unicode_literals.py
test_update.py
test_utils.py [utils] Don't attempt to coerce JS strings to numbers in js_to_json (#26851) 2020-10-18 00:10:41 +07:00
test_verbose_output.py
test_write_annotations.py
test_youtube_chapters.py [youtube] Extract chapters from JSON (closes #24819) 2020-06-06 04:22:10 +07:00
test_youtube_lists.py
test_youtube_signature.py [youtube] Improve player id extraction and add tests 2020-05-02 07:18:08 +07:00
testcert.pem
versions.json