On 2024-01-02 03:26, Oskar Skog via Cygwin wrote:
On 2024-01-02 08:40, Cedric Blancher via Cygwin wrote:
Good morning!
I'd like to request https://github.com/ytdl-org/youtube-dl as a Cygwin
package, so we can mirror training videos locally.
Also, it is a cool demo to show the power of Cygwin, to show that it
can download youtube videos without paying for "Youtube Premium" =:-)

I think yt-dlp might be better.  I had to switch to it a while ago when youtube-dl took too long to fix an issue with downloading from Youtube.
You also don't need to package it, you should be able to install it with pip.
python3 -m ensurepip
pip3 install yt-dlp

Cygwin ensurepip fails as it is bundled in python39 but install yt_dlp works. Got a command line test script?

$ python3 -m ensurepip
Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 188, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.9/runpy.py", line 147, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/lib/python3.9/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/usr/lib/python3.9/ensurepip/__init__.py", line 30, in <module>
    _SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools")
File "/usr/lib/python3.9/ensurepip/__init__.py", line 27, in _get_most_recent_wheel_version
    return str(max(_wheels[pkg], key=distutils.version.LooseVersion))
ValueError: max() arg is an empty sequence
$ pip3 install yt-dlp
Collecting yt-dlp
  Downloading yt_dlp-2023.12.30-py2.py3-none-any.whl.metadata (160 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 160.7/160.7 kB 1.1 MB/s eta 
0:00:00
Collecting mutagen (from yt-dlp)
  Downloading mutagen-1.47.0-py3-none-any.whl.metadata (1.7 kB)
Collecting pycryptodomex (from yt-dlp)
  Downloading pycryptodomex-3.19.1.tar.gz (4.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.8/4.8 MB 17.4 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: certifi in /usr/local/lib/python3.9/site-packages (from yt-dlp) (2023.7.22) Requirement already satisfied: requests<3,>=2.31.0 in /usr/lib/python3.9/site-packages (from yt-dlp) (2.31.0)
Collecting urllib3<3,>=1.26.17 (from yt-dlp)
  Downloading urllib3-2.1.0-py3-none-any.whl.metadata (6.4 kB)
Collecting websockets>=12.0 (from yt-dlp)
  Downloading websockets-12.0-py3-none-any.whl.metadata (6.6 kB)
Collecting brotli (from yt-dlp)
  Downloading Brotli-1.1.0.tar.gz (7.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.4/7.4 MB 18.7 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.9/site-packages (from requests<3,>=2.31.0->yt-dlp) (2.1.0) Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3.9/site-packages (from requests<3,>=2.31.0->yt-dlp) (3.3)
Downloading yt_dlp-2023.12.30-py2.py3-none-any.whl (3.0 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 3.4 MB/s eta 0:00:00
Downloading urllib3-2.1.0-py3-none-any.whl (104 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 104.6/104.6 kB 1.1 MB/s eta 0:00:00
Downloading websockets-12.0-py3-none-any.whl (118 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.4/118.4 kB 1.2 MB/s eta 0:00:00
Downloading mutagen-1.47.0-py3-none-any.whl (194 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 194.4/194.4 kB 2.6 MB/s eta 0:00:00
Building wheels for collected packages: brotli, pycryptodomex
  Building wheel for brotli (pyproject.toml) ... done
Created wheel for brotli: filename=Brotli-1.1.0-cp39-cp39-cygwin_3_4_10_x86_64.whl size=2906244 sha256=d3fc69d3cc5076fffeff0104327d0a2fbdce52083a3ad89ed97bdc0c0446a457 Stored in directory: /mnt/c/Users/bwi/.cache/pip/wheels/e3/c7/48/21d8f0b69bca52c19804d681cf8c428c0e7b211b7da1a1b1f9
  Building wheel for pycryptodomex (pyproject.toml) ... done
Created wheel for pycryptodomex: filename=pycryptodomex-3.19.1-cp35-abi3-cygwin_3_4_10_x86_64.whl size=2736435 sha256=6b6ee7d34fb59369418b2c88d1743072f4c6f8d038e2cc77b9722af63c29b0af Stored in directory: /mnt/c/Users/bwi/.cache/pip/wheels/32/52/9c/c1698f7da3d204f335431681bb20b885a4c56e49fb8dad0adf
Successfully built brotli pycryptodomex
Installing collected packages: brotli, websockets, urllib3, pycryptodomex, mutagen, yt-dlp
  Attempting uninstall: urllib3
    Found existing installation: urllib3 1.26.7
    Uninstalling urllib3-1.26.7:
      Successfully uninstalled urllib3-1.26.7
Successfully installed brotli-1.1.0 mutagen-1.47.0 pycryptodomex-3.19.1 urllib3-2.1.0 websockets-12.0 yt-dlp-2023.12.30

--
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                -- Antoine de Saint-Exupéry

--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to