Skip to content

A feature-rich command-line audio/video downloader

Merge remote-tracking branch 'jaimemf/format_spec_groups' (closes #6124)

Jaime Marquínez Ferrándiz03950c90f778
diff --cc youtube_dl/compat.py
index e4b9286c06,bc218dd719..ace5bd716a
--- a/youtube_dl/compat.py
+++ b/youtube_dl/compat.py
@@@ -426,16 -388,11 +426,21 @@@ else
pass
return _terminal_size(columns, lines)
+try:
+ itertools.count(start=0, step=1)
+ compat_itertools_count = itertools.count
+except TypeError: # Python 2.6
+ def compat_itertools_count(start=0, step=1):
+ n = start
+ while True:
+ yield n
+ n += step
+
+ if sys.version_info >= (3, 0):
+ from tokenize import tokenize as compat_tokenize_tokenize
+ else:
+ from tokenize import generate_tokens as compat_tokenize_tokenize
+
__all__ = [
'compat_HTTPError',
'compat_basestring',