Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "fmt"
- "net/http"
- "strconv"
- "sync"
- )
- func main() {
- wg := sync.WaitGroup{}
- for i := 2480990; i <= 2481040; i++ {
- wg.Add(1)
- go func(i int) {
- defer wg.Done()
- uri := "https://lms.misis.ru/courses/13049/files/" + strconv.Itoa(i)
- resp, err := http.Get(uri)
- if err == nil && resp.StatusCode == 200 {
- fmt.Println(uri)
- } else {
- fmt.Printf("Nothing was found: %d\n", i)
- }
- }(i)
- }
- wg.Wait()
- }
Advertisement
Add Comment
Please, Sign In to add comment