Last active
October 5, 2017 14:53
-
-
Save JSkally/0e938f9d0f20ce94953fea8ced46c5df to your computer and use it in GitHub Desktop.
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" | |
"github.com/PuerkitoBio/goquery" | |
"strings" | |
) | |
func crawl (url string) { | |
doc, err := goquery.NewDocument(url) | |
if err != nil { | |
fmt.Println("ERROR") | |
} | |
doc.Find("body > ul > li").Each( | |
func(i int, s *goquery.Selection){ | |
symbol := s.Find("a").Text() | |
fmt.Println("Symbol: %s\n", strings.TrimSpace(symbol)) | |
}) | |
} | |
func main(){ | |
crawl("https://www.jamstockex.com/ticker-data") | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment