File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ const (
2121)
2222
2323var (
24- years = []int {2024 , 2025 }
24+ years = []int {time . Now (). Year () }
2525)
2626
2727type NodeIterator struct {
@@ -71,12 +71,13 @@ func main() {
7171}
7272
7373func parseHTML (url string ) (* html.Node , error ) {
74- const XPATH = `/html/body/div[1]/div/div/div/div[2]/div/div/div/div[2]/div/div/table/tbody`
74+ const XPATH_1 = `/html/body/div[1]/div/div/div/div[2]/div/div/div/div[2]/div/div/table/tbody`
75+ const XPATH_2 = `/html/body/div/div/div/div/div[2]/div/div/div/div[4]/div/div/table/tbody`
7576
7677 doc , err := htmlquery .LoadURL (url )
7778 checkErr (err )
7879
79- node , err := htmlquery .Query (doc , XPATH )
80+ node , err := htmlquery .Query (doc , XPATH_1 )
8081 checkErr (err )
8182
8283 return node , nil
You can’t perform that action at this time.
0 commit comments