1 | import net.http |
2 | |
3 | fn main() { |
4 | html := http.get_text('https://news.ycombinator.com') |
5 | mut pos := 0 |
6 | for { |
7 | pos = html.index_after('https://', pos + 1) |
8 | if pos == -1 { |
9 | break |
10 | } |
11 | end := html.index_after('"', pos) |
12 | println(html[pos..end]) |
13 | } |
14 | } |