class Streamlink < Formula include Language::Python::Virtualenv desc "CLI for extracting streams from various websites to a video player" homepage "https://streamlink.github.io/" url "https://files.pythonhosted.org/packages/32/5b/bf70fe6937eb47c301329262abf1fb779e99b60eedaa99787b6dcba30d7c/streamlink-2.4.0.tar.gz" sha256 "e95588e222d1a7bd51e3171cd4bce84fd6f646418537aff37993d40f597810af" license "BSD-2-Clause" head "https://github.com/streamlink/streamlink.git", branch: "master" bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "8a363177dbc915c789c474834f3564ade4c0227741958e840ed3fb845e063af6" sha256 cellar: :any_skip_relocation, big_sur: "b31dd9fb5fdd4881269256544379060b065a73688451869d4111c72140d02323" sha256 cellar: :any_skip_relocation, catalina: "b35e07318cc3da02f5d3784273d5f2931d27be4d173761910d0ecb8a6de8bfc0" sha256 cellar: :any_skip_relocation, mojave: "8986287356842960772a48322a8bdf43abb7dd98e1ffe186a9637e0a3e3262fb" sha256 cellar: :any_skip_relocation, x86_64_linux: "1ec7cca4a5cef9fec5c04a48e053e4235f8acbe49f895a75e8fec8d632921eee" end depends_on "python@3.9" uses_from_macos "libffi" uses_from_macos "libxml2" uses_from_macos "libxslt" on_linux do depends_on "pkg-config" => :build end resource "certifi" do url "https://files.pythonhosted.org/packages/6d/78/f8db8d57f520a54f0b8a438319c342c61c22759d8f9a1cd2e2180b5e5ea9/certifi-2021.5.30.tar.gz" sha256 "2bbf76fd432960138b3ef6dda3dde0544f27cbf8546c458e60baf371917ba9ee" end resource "charset-normalizer" do url "https://files.pythonhosted.org/packages/e7/4e/2af0238001648ded297fb54ceb425ca26faa15b341b4fac5371d3938666e/charset-normalizer-2.0.4.tar.gz" sha256 "f23667ebe1084be45f6ae0538e4a5a865206544097e4e8bbcacf42cd02a348f3" end resource "idna" do url "https://files.pythonhosted.org/packages/cb/38/4c4d00ddfa48abe616d7e572e02a04273603db446975ab46bbcd36552005/idna-3.2.tar.gz" sha256 "467fbad99067910785144ce333826c71fb0e63a425657295239737f7ecd125f3" end resource "iso-639" do url "https://files.pythonhosted.org/packages/5a/8d/27969852f4e664525c3d070e44b2b719bc195f4d18c311c52e57bb93614e/iso-639-0.4.5.tar.gz" sha256 "dc9cd4b880b898d774c47fe9775167404af8a85dd889d58f9008035109acce49" end resource "iso3166" do url "https://files.pythonhosted.org/packages/5b/62/b0f573e5d9ea128084f2440924e95f4e54690ccee9d974b5bf345e5f8540/iso3166-1.0.1.tar.gz" sha256 "b1e58dbcf50fbb2c9c418ec7a6057f0cdb30b8f822ac852f72e71ba769dae8c5" end resource "isodate" do url "https://files.pythonhosted.org/packages/b1/80/fb8c13a4cd38eb5021dc3741a9e588e4d1de88d895c1910c6fc8a08b7a70/isodate-0.6.0.tar.gz" sha256 "2e364a3d5759479cdb2d37cce6b9376ea504db2ff90252a2e5b7cc89cc9ff2d8" end resource "lxml" do url "https://files.pythonhosted.org/packages/e5/21/a2e4517e3d216f0051687eea3d3317557bde68736f038a3b105ac3809247/lxml-4.6.3.tar.gz" sha256 "39b78571b3b30645ac77b95f7c69d1bffc4cf8c3b157c435a34da72e78c82468" end resource "pycryptodome" do url "https://files.pythonhosted.org/packages/88/7f/740b99ffb8173ba9d20eb890cc05187677df90219649645aca7e44eb8ff4/pycryptodome-3.10.1.tar.gz" sha256 "3e2e3a06580c5f190df843cdb90ea28d61099cf4924334d5297a995de68e4673" end resource "PySocks" do url "https://files.pythonhosted.org/packages/bd/11/293dd436aea955d45fc4e8a35b6ae7270f5b8e00b53cf6c024c83b657a11/PySocks-1.7.1.tar.gz" sha256 "3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0" end resource "requests" do url "https://files.pythonhosted.org/packages/e7/01/3569e0b535fb2e4a6c384bdbed00c55b9d78b5084e0fb7f4d0bf523d7670/requests-2.26.0.tar.gz" sha256 "b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7" end resource "six" do url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" end resource "urllib3" do url "https://files.pythonhosted.org/packages/4f/5a/597ef5911cb8919efe4d86206aa8b2658616d676a7088f0825ca08bd7cb8/urllib3-1.26.6.tar.gz" sha256 "f57b4c16c62fa2760b7e3d97c35b255512fb6b59a259730f36ba32ce9f8e342f" end resource "websocket-client" do url "https://files.pythonhosted.org/packages/4e/8f/b5c45af5a1def38b07c09a616be932ad49c35ebdc5e3cbf93966d7ed9750/websocket-client-1.2.1.tar.gz" sha256 "8dfb715d8a992f5712fff8c843adae94e22b22a99b2c5e6b0ec4a1a981cc4e0d" end def install virtualenv_install_with_resources man1.install_symlink libexec/"share/man/man1/streamlink.1" end test do system "#{bin}/streamlink", "https://vimeo.com/189776460", "360p", "-o", "video.mp4" assert_match "video.mp4: ISO Media, MP4 v2", shell_output("file video.mp4") end end