Sha256: 4259e013ad842d3c5dbabbfc5e22cf655fcdf386219f49466b508612f49a4fc5
Contents?: true
Size: 634 Bytes
Versions: 2
Compression:
Stored size: 634 Bytes
Contents
#!/usr/bin/env ruby require "bundler/setup" require "douyin_download" require "thor" class DouyinDownloadCli < Thor desc "download URL", "download a video from douyin shared url" def download(url) begin puts "download #{url}" parser = DouyinDownload::Parser.new(url) play_url = parser.play_url description = parser.description filename = parser.download if filename puts "download complete, file: #{filename}" else puts "download failed." end rescue Exception => e puts "download failed: '#{e.message}'" end end end DouyinDownloadCli.start(ARGV)
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
douyin_download-0.1.1 | exe/douyin_download |
douyin_download-0.1.0 | exe/douyin_download |