Created
August 5, 2019 12:34
-
-
Save Auties00/ab1fd5e1398b366ffbbb92e1805f5bf4 to your computer and use it in GitHub Desktop.
Vittoria!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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