Skip to content

Instantly share code, notes, and snippets.

@eoinahern
Created February 28, 2018 20:56
Show Gist options
  • Save eoinahern/acc5d19876906931c2201ba87875360d to your computer and use it in GitHub Desktop.
Save eoinahern/acc5d19876906931c2201ba87875360d to your computer and use it in GitHub Desktop.
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