Last active
November 29, 2017 12:45
-
-
Save stnc/a9a235edeb45b3c3a5c2288534abf28f to your computer and use it in GitHub Desktop.
goLang simple crawler
This file contains hidden or 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" | |
"net/http" | |
"io/ioutil" | |
) | |
func main() { | |
crawl(); | |
} | |
//https://www.reddit.com/r/golang/comments/2twz45/download_webpage_and_extract_words/ | |
func crawl() { | |
var url = "http://www.h4labs.com" | |
resp, err := http.Get(url) | |
if err != nil { | |
// handle error | |
} | |
defer resp.Body.Close() | |
body, err := ioutil.ReadAll(resp.Body) | |
fmt.Print(string(body)) | |
} |
This file contains hidden or 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
https://www.youtube.com/watch?v=8746NP2aIuo | |
https://stackoverflow.com/questions/20781111/postgresql-9-1-primary-key-autoincrement |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment