diff --git a/downloader/downloader.go b/downloader/downloader.go index 1a64e08..0d8dff0 100644 --- a/downloader/downloader.go +++ b/downloader/downloader.go @@ -29,7 +29,7 @@ import ( ) func GetPlaylistVideoIDs(channelName string, maxVideos int, stopChan stop.Chan, pool *ip_manager.IPPool) ([]string, error) { - args := []string{"--skip-download", "https://www.youtube.com/channel/" + channelName + "/videos", "--get-id", "--flat-playlist", "--cookies", "cookies.txt"} + args := []string{"--skip-download", "https://www.youtube.com/channel/" + channelName + "/videos", "--get-id", "--flat-playlist", "--cookies", "cookies.txt", "--playlist-end", fmt.Sprintf("%d", maxVideos)} ids, err := run(channelName, args, stopChan, pool) if err != nil { return nil, errors.Err(err)