탬플릿
Less than 1 minute
yt-dlp
로 mp3 추출Prerequisite(s)
ffmpeg
yt-dlp
아래 스크립트를 실행하여 설치
choco install -y ffmpeg yt-dlp
SizedBox(width: 200.0, height:100.0,
child: Shimmer.fromColors(
baseColor: Colors.red,
highlightColor: Colors.yellow,
child: Text('Shimmer',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 40.0, fontWeight: FontWeight.bold,
),
),
),
)l
private const val TIME_STAMP_FORMAT = "EEEE. MMM d, yyyy - hh:mm:ss a"
private const val DATE_FORMAT = "yyyy-MM-dd"
fun Long.getTimeStamp(): String {
val date = Date(this)
val simpleDateFormat = SimpleDateFormat(TIME_STAMP_FORMAT, Locale.getDefault())
simpleDateFormat.timeZone = TimeZone.getDefault()
return simpleDateFormat.format(date)
}
fun Long.getYearMonthDay(): String {
val date = Date(this)
val simpleDateFormat = SimpleDateFormat(DATE_FORMAT, Locale.getDefault())
simpleDateFormat.timeZone = TimeZone.getDefault()
return simpleDateFormat.format(date)
}
@Throws(ParseException::class)
fun String.getDateUnixTime(): Long {
try {
val simpleDateFormat = SimpleDateFormat(DATE_FORMAT, Locale.getDefault())
simpleDateFormat.timeZone = TimeZone.getDefault()
return simpleDateFormat.parse(this)!!.time
} catch (e: ParseException) {
e.printStackTrace(0)
}
throw ParseException("Please Enter a valid date", 0)
}
val currentTime = System.currentTimeMillis()
println(currentTime.getTimeStamp())
// Sunday, September 20, 2020 - 10:48:26 AM
println(currentTime.getYearMonthDay())
// 2020-09-20
println("2020-09-20".getDateUnixTime())
// 1600549200000
Paste the entire script to the Chrome DevTool (F12) Console
deleteVideoFromWatchLater
/playlist?list=WL
function deleteVideoFromWatchLater() {
video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];
video.querySelector('#primary button[aria-label="Action menu"]').click();
var things = document.evaluate(
'//span[contains(text(),"Remove from")]',
document,
null,
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
null
);
for (var i = 0; i < things.snapshotLength; i++) {
things.snapshotItem(i).click();
}
}
async function deleteWatchLater() {
// Fiddle with these if you'd like
let batchSize = 200; // Number to delete at once before waiting
let waitBetweenBatchesInMilliseconds = 1000 * 60 * 5; // 5 minutes
let waitBetweenDeletionsInMilliseconds = 1000; // Half a second
let totalWaitTime = ((5000 / batchSize) * (waitBetweenBatchesInMilliseconds / 1000 / 60)) + (5000 * (waitBetweenDeletionsInMilliseconds / 1000 / 60))
console.log(`Deletion will take around ${totalWaitTime.toFixed(0)} minutes to run if the playlist is full.`);
let count = 0;
while (true) {
await new Promise(resolve => setTimeout(resolve, waitBetweenDeletionsInMilliseconds));
deleteVideoFromWatchLater();
count++;
if (count % batchSize === 0 && count !== 0) {
console.log('Waiting for 5 minutes...');
await new Promise(resolve => setTimeout(waitBetweenBatchesInMilliseconds));
}
}
}
deleteWatchLater();