摘要: 一种scanf var x intfmt.Println("input a int number")fmt.Scan(&x)fmt.Printf("读取到内容:%d\nhe",x)一种 bufio reader := bufio.NewReader(os.Stdin)res,_ := reader. 阅读全文
posted @ 2020-08-25 20:00 brady-wang 阅读(2349) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "github.com/antchfx/htmlquery" "io/ioutil" "net/http" ) func main() { var url string = "https://www.huya.com/l" resp, _ := 阅读全文
posted @ 2020-08-25 14:56 brady-wang 阅读(140) 评论(0) 推荐(0) 编辑
摘要: <?php $html = file_get_contents('https://tieba.baidu.com/f?kw=%C9%EE%BB%A7&fr=ala0&loc=rec'); $dom = new DOMDocument(); // 从一个字符串加载HTML $dom->loadHTML 阅读全文
posted @ 2020-08-25 12:27 brady-wang 阅读(1201) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "github.com/antchfx/htmlquery" "net/http" ) func main() { var url string = "https://tieba.baidu.com/f?kw=%C9%EE%BB%A7&fr=a 阅读全文
posted @ 2020-08-25 11:29 brady-wang 阅读(307) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "io/ioutil" "net/http" "regexp" ) func main() { var url string = "https://tieba.baidu.com/f?kw=%C9%EE%BB%A7&fr=ala0&loc=re 阅读全文
posted @ 2020-08-25 11:14 brady-wang 阅读(248) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "regexp" ) func main() { context1 := "3.14 123123 .68 haha 1.0 abc 6.66 123." //MustCompile解析并返回一个正则表达式。如果成功返回,该Regexp就可用于 阅读全文
posted @ 2020-08-25 09:32 brady-wang 阅读(124) 评论(0) 推荐(0) 编辑