Skip to content

Instantly share code, notes, and snippets.

@bentranter
Last active August 29, 2015 14:27
Show Gist options
  • Save bentranter/2dab79096dbcbe55d8c9 to your computer and use it in GitHub Desktop.
Save bentranter/2dab79096dbcbe55d8c9 to your computer and use it in GitHub Desktop.
What scraping HTML is like
// This could be you if you choose to scrape HTML
for _, article := range articles {
fmt.Printf("\033[33m%s\033[0m - \033[32mTitle: %s\033[0m\nDescription: %s\n\033[36mhttp://kijiji.ca%s\033[0m\n\n", scrape.Text(article.NextSibling.NextSibling), scrape.Text(article.FirstChild.NextSibling), scrape.Text(article), scrape.Attr(article.FirstChild.NextSibling, "href"))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment