|
@@ -0,0 +1,22 @@
|
|
|
|
+package main
|
|
|
|
+
|
|
|
|
+import (
|
|
|
|
+ "fmt"
|
|
|
|
+ "github.com/PuerkitoBio/goquery"
|
|
|
|
+)
|
|
|
|
+
|
|
|
|
+func GetPage(url string) {
|
|
|
|
+ doc, _ := goquery.NewDocument(url)
|
|
|
|
+ doc.Find("div#tab1 table.wd_table tr").Each(func(_ int, s *goquery.Selection) {
|
|
|
|
+ hour := s.Find("th").Text()
|
|
|
|
+ fmt.Println(hour)
|
|
|
|
+ fmt.Println("/")
|
|
|
|
+ times := s.Find("td span").Text()
|
|
|
|
+ fmt.Println(times)
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func main() {
|
|
|
|
+ url := "http://www.bustei.com/timetable/index/2225/2348"
|
|
|
|
+ GetPage(url)
|
|
|
|
+}
|