Advertisement
dereksir

Untitled

Dec 19th, 2023
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.36 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4.     "fmt"
  5.     "io"
  6.     "net/http"
  7. )
  8.  
  9. func main() {
  10.     // URL to make the HTTP request to
  11.     url := "https://scrapeme.live/shop"
  12.  
  13.     // Make the GET request
  14.     resp, _ := http.Get(url)
  15.     defer resp.Body.Close()
  16.  
  17.     // Read the response body
  18.     bytes, _ := io.ReadAll(resp.Body)
  19.  
  20.     // Print the body as a string
  21.     fmt.Println("HTML:\n\n", string(bytes))
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement