-
Notifications
You must be signed in to change notification settings - Fork 1
Generate video URLs from template
Aleksander Kołata edited this page Apr 22, 2017
·
1 revision
Sometimes, a website has a lot of video under almost the same url - the only difference is a video number. To simply generate them :
public static void main(String[] args) {
Downloader downloader = new Downloader();
downloader.urlTemplate = "https://website/video_%s.mp4";
downloader.numberOfAllVideos = 10;
downloader.writeURLsToFile("C:\\Users\\Aleksander\\Desktop\\generated_urls.txt");
}
As a result, file generated_urls.txt was created on my desktop, with this content :
https://website/video_00.mp4 https://website/video_01.mp4 ...https://website/video_09.mp4 https://website/video_10.mp4