リブログ記事””abemaをダウンロードしてみた””
シリーズのダウンロードもできるようにしましたシリーズがURLの最後で連番になっているのを利用します。同時にダウンロードしますので、あっという間にダウンロードできますyt-dlp_fromClip.exeはこちらからダウンロードできますusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Deployment.Application;using System.Diagnostics;using System.Drawing;using System.IO;using System.Linq;using System.Net;using System.Net.NetworkInformation;using System.Text;using System.Threading.Tasks;using System.Windows.Forms;namespace yt_dpl_fromClip{ public partial class Form1 : Form { ClipBoardWatcher cbw; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { cbw = new ClipBoardWatcher(); cbw.DrawClipBoard += (sender2, e2) => { if (Clipboard.ContainsText()) { this.label1.Text=(Clipboard.GetText()); if( this.label1.Text.IndexOf("https://")>=0) { if (lastnum.Text == "0") { Download(label1.Text); } } } }; } private void Form1_FormClosing(object sender, FormClosingEventArgs e) { cbw.Dispose(); } private void button1_Click(object sender, EventArgs e) { Int32 start = Int32.Parse(label1.Text.Substring(label1.Text.Length - 1)); Int32 last = Int32.Parse(lastnum.Text); String fn = label1.Text.Substring(0, label1.Text.Length - 1); if (start <= last) { for (int k = start; k <= last; k++) { Download(fn + k); } } } private void Download(string w) { Char wl = label1.Text[label1.Text.Length - 1]; ProcessStartInfo pInfo = new ProcessStartInfo(); string ExeDirPath = Path.GetDirectoryName(Application.ExecutablePath); ExeDirPath = Path.GetDirectoryName(Application.ExecutablePath); pInfo.FileName = ExeDirPath + "\\" + @"yt-dlp.exe"; pInfo.Arguments = w; Process.Start(pInfo); } private void button2_Click(object sender, EventArgs e) { this.Close(); } }}