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.
4 years ago
Sergey M․
1d9bf655e6
[utils] Recognize wav mimetype ( closes #26463 )
4 years ago
Sergey M․
42db58ec73
[utils] Improve str_to_int
5 years ago
Remita Amine
348c6bf1c1
[utils] handle int values passed to str_to_int
5 years ago
Sergey M․
1ced222120
[utils] Add generic caesar cipher and rot47
5 years ago
InfernalUnderling
9d30c2132a
[utils] Handle rd-suffixed day parts in unified_strdate ( #23199 )
5 years ago
Sergey M․
824fa51165
[utils] Improve subtitles_filename ( closes #22753 )
5 years ago
Sergey M․
28cc2241e4
[utils] Restrict parse_codecs and add theora as known vcodec ( #21381 )
5 years ago
Sergey M․
53cd37bac5
[utils] Improve strip_or_none
5 years ago
Jakub Wilk
fd35d8cdfd
[utils] Transliterate "þ" as "th" ( #20897 )
Despite visual similarity "þ" is unrelated to "p".
It is normally transliterated as "th":
$ echo þ-Þ | iconv -t ASCII//TRANSLIT
th-TH
5 years ago
Sergey M․
5e1271c56d
[utils] Improve int_or_none and float_or_none ( #20403 )
5 years ago
Sergey M․
0dc41787af
[utils] Introduce parse_bitrate
5 years ago
Sergey M․
fad4ceb534
[utils] Fix urljoin for paths with non-http(s) schemes
5 years ago
Sergey M․
25d110be30
[utils] Properly recognize AV1 codec ( closes #17506 )
6 years ago
Sergey M․
af03000ad5
[utils] Introduce url_or_none
6 years ago
Sergey M․
e9c671d5e8
[utils] Allow JSONP with empty func name ( closes #17028 )
6 years ago
Enes
85750f8972
[openload] Improve ext extraction
6 years ago
Remita Amine
3bb3ff38a1
[test_utils] add tests for b836118724
6 years ago
Sergey M․
6cc622327f
[utils] Introduce merge_dicts
6 years ago
Sergey M․
1cc47c6674
[utils] Fix match_str for boolean meta fields
6 years ago
Philipp Hagemeister
f226880c6d
[tennistv] Add support for tennistv.com
6 years ago
Sergey M․
b871d7e954
[utils] Add parse_resolution
6 years ago
Sergey M․
befa4708fd
[utils] Fixup some common URL's typos in sanitize_url ( closes #15649 )
6 years ago
Sergey M․
c707b1d828
[test_utils] Add tests for malformed JSON handling in js_to_json
6 years ago
Mike Fährmann
c384d537f8
[util] Improve scientific notation handling in js_to_json ( closes #14789 )
6 years ago
Sergey M․
b555ae9bf1
[utils] Add another date format pattern ( #14999 )
7 years ago
Sergey M․
056653bbb1
[utils] Add support for zero years and months in parse_duration
7 years ago
Yen Chi Hsuan
3869028ffb
[utils] Use bytes-like objects in dfxp2srt
This fixes handling of non-UTF8 TTML subtitles
Closes #14191
7 years ago
Yen Chi Hsuan
95f3f7c20a
[utils] Fix unescapeHTML for misformed string like "&a"" ( #13935 )
7 years ago
Sergey M․
5b232f46dc
[utils] Skip missing params in cli_bool_option ( closes #13865 )
7 years ago
Sergey M․
dee2ff1d81
[test_utils] Fix tests under Windows
7 years ago
Yen Chi Hsuan
609ff8ca19
[utils] Support attributes with no values in get_elements_by_attribute()
7 years ago
Sergey M․
b4a3d461e4
[utils] Handle HTMLParseError in extract_attributes ( closes #13349 )
7 years ago
Sergey M․
2ae2ffda5e
[utils] Improve unified_timestamp
7 years ago
Yen Chi Hsuan
5552c9eb0f
[utils] Recognize more patterns in strip_jsonp()
Used in Youku Show pages
7 years ago
Yen Chi Hsuan
0c26548601
[cda] Implement birthday verification ( closes #12789 )
7 years ago
Sergey M․
deef31955b
[utils] Improve unified_timestamp
Seen at http://zaq1.pl/video/xev0e
7 years ago
Tithen-Firion
9222d94510
[test_utils] Add one more clean_html test
7 years ago
Remita Amine
5b995f713b
[utils] add support for ttml styles
7 years ago
Sergey M․
a426ef6d78
[test_utils] Do not use dash in env variables' names
7 years ago
Sergey M․
41c5e60dd5
[test_utils] Fix expand_path tests
7 years ago
Sergey M․
51098426b8
[utils] Introduce expand_path
7 years ago
Sergey M․
4b5de77bdb
[utils] Process bytestrings in urljoin ( closes #12369 )
7 years ago
Yen Chi Hsuan
f48409c7ac
[utils] Add pkcs1pad
Used in daisuki.net (#4738 )
7 years ago
Thomas Christlieb
2af12ad9d2
Introduce get_elements_by_class and get_elements_by_attribute utility functions
7 years ago
Sergey M․
4195096ea8
[utils] Improve comments processing in js_to_json ( closes #11947 )
7 years ago
Michal Čihař
b3ee552e4b
[utils] Handle single-line comments in js_to_json
7 years ago
Sergey M․
15846398ca
[utils] Improve parse_duration
7 years ago
Sergey M․
cb655f34fb
[utils] Add more date formats
7 years ago
Remita Amine
7fe1592073
[common] fix dash codec information for mixed videos and fragment url construction( #11490 )
8 years ago