Created
February 28, 2018 20:56
-
-
Save eoinahern/acc5d19876906931c2201ba87875360d to your computer and use it in GitHub Desktop.
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 ( | |
"fmt" | |
"io" | |
"net/http" | |
"os" | |
) | |
func main() { | |
fmt.Println("download started !") | |
file, err := os.Create("btchute.mp4") | |
if err != nil { | |
fmt.Println(err) | |
return | |
} | |
//random video i found!!! | |
resp, err := http.Get("https://seed03.bitchute.com/17771/wZvvodgq8qfT.mp4") | |
if err != nil { | |
fmt.Println(err) | |
return | |
} | |
fmt.Println(resp.Status) | |
fmt.Println(resp.Proto) | |
_, err = io.Copy(file, resp.Body) | |
if err != nil { | |
fmt.Println(err) | |
fmt.Println("error copying ?") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment