aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/compat.py
AgeCommit message (Collapse)Author
2016-05-09[compat] Add compat_setenvSergey M․
2016-04-06[compat] Handle tuples properly in urlencode()Yen Chi Hsuan
Fixes #9055
2016-03-26[compat] Add compat_urllib_parse_urlencode and eliminate encode_dictSergey M․
encode_dict functionality has been improved and moved directly into compat_urllib_parse_urlencode All occurrences of compat_urllib_parse.urlencode throughout the codebase have been replaced by compat_urllib_parse_urlencode Closes #8974
2016-03-18[compat] Add compat_xpathSergey M․
2016-03-16Merge pull request #8092 from bpfoley/twitter-thumbnailremitamine
[utils] Add extract_attributes for extracting html tag attributes
2016-03-03[jython] Introduce compat_os_nameYen Chi Hsuan
os.name is always 'java' on Jython
2016-03-03[utils] Add extract_attributes for extracting html tag attributesBrian Foley
This is much more robust than just using regexps, and handles all the common scenarios, such as empty/no values, repeated attributes, entity decoding, mixed case names, and the different possible value quoting schemes.
2016-02-14[refactor] Single quotes consistencySergey M․
2016-01-16[compat] Clarify the versions requiring compat_kwargsYen Chi Hsuan
It's supported since 2.7.0 alpha 1 and 2.6.5 rc 1. See https://hg.python.org/cpython/file/v2.7a1/Misc/NEWS#l337 https://hg.python.org/cpython/file/v2.6.5rc1/Misc/NEWS#l28
2015-11-23Rename compat_urllib_request_Request to sanitized_Request and move to utilsSergey M․
2015-11-23[compat] Add compat_urllib_request_RequestSergey M․
This is actually not a compatibility routine but rather a workaround for URLs without protocol specified. The protocol-less URL is treated as HTTP one since it's most probable scenario and it will most likely to redirect to HTTPS if HTTPS was actually expected. This routine could also be useful for any Request preprocessing that may be added in future.
2015-10-29[compat] compat_etree_fromstring: clarify commentJaime Marquínez Ferrándiz
2015-10-26[compat] compat_etree_fromstring: also decode the text attributeJaime Marquínez Ferrándiz
Deletes parse_xml from utils, because it also does it.
2015-10-25[compat] compat_etree_fromstring: only decode bytes objectsJaime Marquínez Ferrándiz
2015-10-25Use a wrapper around xml.etree.ElementTree.fromstring in python 2.x (#7178)Jaime Marquínez Ferrándiz
Attributes aren't unicode objects, so they couldn't be directly used in info_dict fields (for example '--write-description' doesn't work with bytes).
2015-10-18[compat] Add compat_urllib_request_DataHandlerYen Chi Hsuan
2015-10-06[compat] Fix wrong lines/columns orderSergey M․
stty size is rows x columns
2015-10-06[compat] Do not compare None <= 0Philipp Hagemeister
The result is meaningless (and it emits a warning in cpython2 when called with -3), so handle None before making integer comparisons.
2015-10-03[compat] Allow overriding by only COLUMNS or LINES in compat_get_terminal_sizeYen Chi Hsuan
Now the semantic of this function is identical to shutil.get_terminal_size() in Python 3.3+. The new behavior also corresponds to the old get_term_width(), which is removed in 003c69a84b68cadb46aeb8e03115848a722fd675
2015-09-14[compat] Do not use unicodePhilipp Hagemeister
If the code ever runs on 3.x, it would fail. Even if it never does, the unicode name confuses Python 3 code analysis tools.
2015-09-05[compat] Fix python version check for compat_shlex_splitSergey M․
2015-09-05[compat] Add compat shlex.splitSergey M․
2015-08-03Merge remote-tracking branch 'jaimemf/format_spec_groups' (closes #6124)Jaime Marquínez Ferrándiz
2015-07-30[viewster] extract the api auth tokenremitamine
Closes #6406.
2015-07-18[compat] Fix _asciireSergey M․
2015-07-18[compat] Fix missing _asciire on python 2.6Sergey M․
2015-07-17[compat] Mention unquote_plusSergey M․
2015-07-17[compat] Add compat_urllib_parse_unquote_plusSergey M․
2015-07-17[compat] Simplify and use latest cpython 3 codeSergey M․
2015-07-17Don't forget trailing '%'fnord
2015-07-17fix TestCompat test_all_presentfnord
2015-07-17remove kebabfnord
2015-07-17remove debugprintfnord
2015-07-17replace old compat_urllib_parse_unquote with backport from python3's functionfnord
* required unquote_to_bytes function ported as well (uses .decode('hex') instead of dynamically populated _hextobyte global) * required implicit conversion to bytes and/or unicode in places due to differing type assumptions in p3
2015-07-15compat_urllib_parse_unquote: crash fix: only decode valid hexfnord
on python 2 the following has a { "crash_rate": "100%" } of the time as it tries to parse '" ' as hex.
2015-07-10[compat] Add compat_itertools_countYen Chi Hsuan
'step' parameter is added in Python 2.7
2015-06-28[YoutubeDL] rework how the format spec is processedJaime Marquínez Ferrándiz
The spec string is processed using 'tokenize.tokenize' to split it in words and operators, the filters are still processed using regular expressions. This should make easier to allow grouping operators with parens.
2015-05-02Remove code that was only used by the Grooveshark extractorJaime Marquínez Ferrándiz
2015-03-27Don't use bare 'except:'Jaime Marquínez Ferrándiz
They catch any exception, including KeyboardInterrupt, we don't want to catch it.
2015-02-28Use shutil.get_terminal_size for getting the terminal width if it's ↵Jaime Marquínez Ferrándiz
available (python >= 3.3)
2015-02-01[compat] Correct compat_basestring definitionPhilipp Hagemeister
2015-02-01Appease pyflakes8-3Philipp Hagemeister
2015-01-30Add a test for --no-check-certificatePhilipp Hagemeister
2015-01-11[compat] Correct socket error class referencePhilipp Hagemeister
2015-01-11[test_compat] Fix alphabetic order to make test_all_present passSergey M․
2015-01-10Add new option --source-addressPhilipp Hagemeister
Closes #3618, fixes #721, fixes #2481, fixes #4551, closes #1020.
2014-12-12[compat] Simplify kwarg detection codePhilipp Hagemeister
This enables nuitka to compile youtube-dl.
2014-12-12Revert "[utils] Work around PyPy stupidity with Windows DLLs (Fixes #4392)"Philipp Hagemeister
This reverts commit 16040f46d64bad8dcc5f948288ef469dd787d3d3.
2014-12-12[utils] Work around PyPy stupidity with Windows DLLs (Fixes #4392)Philipp Hagemeister
2014-12-09Fix PEP8 issue E713Jaime Marquínez Ferrándiz