Skip to content

Commit

Permalink
add algorithms course support
Browse files Browse the repository at this point in the history
  • Loading branch information
timolinn committed Mar 7, 2020
1 parent eddf9f4 commit 9481c54
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ Also note, video downloads **resumes** from where it stopped, so should you expe
+ [x] [gophercises](https://courses.calhoun.io/courses/cor_gophercises)
+ [x] [testwithgo](https://courses.calhoun.io/courses/cor_test)
+ [x] [webdevwithgo](https://courses.calhoun.io/courses/cor_webdev)
+ [x] [algorithms](https://courses.calhoun.io/courses/cor_algo)
+ [ ] [advancedwebdevwithgo](https://https://courses.calhoun.io/courses/cor_awd)
+ [ ] [algorithms](https://courses.calhoun.io/courses/cor_algo)

### Contributing

Expand Down
13 changes: 7 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ var help = flag.Bool("help", false, "prints this output")
var referer = "https://courses.calhoun.io"

var courses = map[string]string{
"testwithgo": "https://courses.calhoun.io/courses/cor_test",
"gophercises": "https://courses.calhoun.io/courses/cor_gophercises",
"algorithms": "https://courses.calhoun.io/courses/cor_algo",
"webdevwithgo": "https://courses.calhoun.io/courses/cor_webdev",
"advancedwebdevwithgo": "https://courses.calhoun.io/courses/cor_awd",
"testwithgo": "https://courses.calhoun.io/courses/cor_test",
"gophercises": "https://courses.calhoun.io/courses/cor_gophercises",
"algorithms": "https://courses.calhoun.io/courses/cor_algo",
"webdevwithgo": "https://courses.calhoun.io/courses/cor_webdev",
}
var delayDuration = 5

Expand Down Expand Up @@ -239,7 +238,9 @@ func getURLs(client *http.Client) []string {
case "advancedwebdevwithgo":
log.Fatal("'Advanced Web Development with Go' not supported yet")
case "algorithms":
log.Fatal("'Algorithms' not supported yet")
if strings.Contains(href, "/lessons/les_algo") {
urls = append(urls, "https://courses.calhoun.io"+href)
}
default:
log.Fatal("course not supported yet. feel free to send a pull request")
}
Expand Down

0 comments on commit 9481c54

Please sign in to comment.