homebrew-cask/Casks/d/douyin.rb

26 lines
936 B
Ruby

cask "douyin" do
version "2.8.0,7044145585217083655,10904299"
sha256 "a46deefb2ace616d293dc2813c7d97cd00a90d85807973b9023494df44af8aa5"
url "https://www.douyin.com/download/pc/obj/douyin-pc-client/#{version.csv.second}/releases/#{version.csv.third}/#{version.csv.first}/darwin-universal/douyin-v#{version.csv.first}-darwin-universal.dmg"
name "Douyin"
name "抖音"
desc "Social software for creating music short videos"
homepage "https://www.douyin.com/"
livecheck do
url "https://www.douyin.com/downloadpage"
regex(%r{douyin[._-]pc[._-]client/(\d+)/releases/(\d+)/(\d+(?:\.\d+)+)/darwin[._-]universal}i)
strategy :page_match do |page, regex|
page.scan(regex).map { |match| "#{match[2]},#{match[0]},#{match[1]}" }
end
end
auto_updates true
app "抖音.app"
zap trash: "~/Library/Preferences/com.bytedance.douyin.desktop.plist",
rmdir: "~/Library/Application Support/抖音"
end