Skip to content

Instantly share code, notes, and snippets.

@Auties00
Created August 5, 2019 12:34
Show Gist options
  • Save Auties00/ab1fd5e1398b366ffbbb92e1805f5bf4 to your computer and use it in GitHub Desktop.
Save Auties00/ab1fd5e1398b366ffbbb92e1805f5bf4 to your computer and use it in GitHub Desktop.
Vittoria!
package main;
import server.HttpServerBuilder;
import youtube.YoutubeBuilder;
import java.util.UUID;
public class YoutubeDownloader {
public static void main(String[] args) throws Exception {
new HttpServerBuilder().create(8080).context("/download/", exchange -> new YoutubeBuilder().setURL(exchange.getRequestURI().toString().replace("/download/", "")).setOut(UUID.randomUUID().toString()).buildRequest().execute().sendAsHTTP(exchange)).asyncExecutor().build();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment