aboutsummaryrefslogtreecommitdiff
path: root/test/test_utils.py
AgeCommit message (Collapse)Author
2023-07-18[test] Fixes for old Pythonsdirkf
2023-07-18[utils] Add {expected_type} and Iterable support to traverse_obj()dirkf
2023-07-05[Misc] Fixes for 2.6 compatibilitydirkf
2023-03-19[utils] Ensure `allow_types` for `variadic()` is a tupledirkf
2023-02-20Escape URLs in `sanitized_Request`, not `sanitize_url` ↵pukkandan
d2558234cf5dd12d6896eed5427b7dcdb3ab7b5a added escaping of URLs while sanitizing. However, `sanitize_url` may not always receive an actual URL. Eg: When using `youtube-dl "search query" --default-search ytsearch`, `search query` gets escaped to `search%20query` before being prefixed with `ytsearch:` which is not the intended behavior. So the escaping is moved to `sanitized_Request` instead.
2022-11-03[utils] Backport traverse_obj (etc) from yt-dlp (#31156)Andrei Lebedev
* Backport traverse_obj and closely related function from yt-dlp (code by pukkandan) * Backport LazyList, variadic(), try_call (code by pukkandan) * Recast using yt-dlp's newer traverse_obj() implementation and tests (code by grub4k) * Add tests for Unicode case folding support matching Py3.5+ (requires f102e3d) * Improve/add tests for variadic, try_call, join_nonempty Co-authored-by: dirkf <fieldhouse@gmx.net>
2022-08-14[jsinterp] Overhaul JSInterp to handle new YT players 4c3f79c5, 324f67b9 ↵dirkf
(#31170) * back-port from yt-dlp 8f53dc44a0cc1c2d98c35740b9293462c080f5d0, thanks pukkandan * also support void, improve <</>> precedence, improve expressions in comma-list * add more tests
2021-01-04[utils] add a function to clean podcast URLsRemita Amine
2020-12-30[utils] accept only supported protocols in url_or_noneRemita Amine
2020-11-17[utils] Skip ! prefixed code in js_to_jsonSergey M․
2020-10-18[utils] Don't attempt to coerce JS strings to numbers in js_to_json (#26851)Kevin O'Connor
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-09-06[utils] Recognize wav mimetype (closes #26463)Sergey M․
2019-12-15[utils] Improve str_to_intSergey M․
2019-11-29[utils] handle int values passed to str_to_intRemita Amine
2019-11-27[utils] Add generic caesar cipher and rot47Sergey M․
2019-11-27[utils] Handle rd-suffixed day parts in unified_strdate (#23199)InfernalUnderling
2019-10-18[utils] Improve subtitles_filename (closes #22753)Sergey M․
2019-06-14[utils] Restrict parse_codecs and add theora as known vcodec (#21381)Sergey M․
2019-05-24[utils] Improve strip_or_noneSergey M․
2019-05-11[utils] Transliterate "þ" as "th" (#20897)Jakub Wilk
Despite visual similarity "þ" is unrelated to "p". It is normally transliterated as "th": $ echo þ-Þ | iconv -t ASCII//TRANSLIT th-TH
2019-03-23[utils] Improve int_or_none and float_or_none (#20403)Sergey M․
2019-03-17[utils] Introduce parse_bitrateSergey M․
2019-01-20[utils] Fix urljoin for paths with non-http(s) schemesSergey M․
2018-09-10[utils] Properly recognize AV1 codec (closes #17506)Sergey M․
2018-07-21[utils] Introduce url_or_noneSergey M․
2018-07-21[utils] Allow JSONP with empty func name (closes #17028)Sergey M․
2018-06-02[openload] Improve ext extractionEnes
2018-05-23[test_utils] add tests for b836118724122a639a1cb78d55d91724bf1e7251Remita Amine
2018-04-28[utils] Introduce merge_dictsSergey M․
2018-04-24[utils] Fix match_str for boolean meta fieldsSergey M․
2018-03-14[tennistv] Add support for tennistv.comPhilipp Hagemeister
2018-03-02[utils] Add parse_resolutionSergey M․
2018-02-19[utils] Fixup some common URL's typos in sanitize_url (closes #15649)Sergey M․
2018-01-20[test_utils] Add tests for malformed JSON handling in js_to_jsonSergey M․
2018-01-20[util] Improve scientific notation handling in js_to_json (closes #14789)Mike Fährmann
2017-12-16[utils] Add another date format pattern (#14999)Sergey M․
2017-10-29[utils] Add support for zero years and months in parse_durationSergey M․
2017-09-16[utils] Use bytes-like objects in dfxp2srtYen Chi Hsuan
This fixes handling of non-UTF8 TTML subtitles Closes #14191
2017-08-19[utils] Fix unescapeHTML for misformed string like "&a&quot;" (#13935)Yen Chi Hsuan
2017-08-09[utils] Skip missing params in cli_bool_option (closes #13865)Sergey M․
2017-07-06[test_utils] Fix tests under WindowsSergey M․
2017-07-05[utils] Support attributes with no values in get_elements_by_attribute()Yen Chi Hsuan
2017-06-12[utils] Handle HTMLParseError in extract_attributes (closes #13349)Sergey M․
2017-06-11[utils] Improve unified_timestampSergey M․
2017-05-26[utils] Recognize more patterns in strip_jsonp()Yen Chi Hsuan
Used in Youku Show pages
2017-05-04[cda] Implement birthday verification (closes #12789)Yen Chi Hsuan
2017-04-30[utils] Improve unified_timestampSergey M․
Seen at http://zaq1.pl/video/xev0e
2017-04-28[test_utils] Add one more clean_html testTithen-Firion
2017-04-19[utils] add support for ttml stylesRemita Amine
2017-03-26[test_utils] Do not use dash in env variables' namesSergey M․