Can I use wget with login credentials to download an online course?
by doodahjones from LinuxQuestions.org on (#5SV2Y)
I'd like to take the course with me to where there's no internet.
I've no real idea what I need to do for this, but I've cobbled this together from the man pages, and it downloads an html file. But when I double-click it, I still have to login and that takes me to the actual online course.
Code:sudo wget -r --mirror --convert-links --adjust-extension --page-requisites --no-parent --user=username --password="password" -e robots=off -U Mozilla https://<course-url>Here's the output:
Code:--2021-12-08 19:37:33-- https://codewithmosh.com/courses/enrolled/1120640
Resolving codewithmosh.com (codewithmosh.com)... 2606:4700:130:436c:6f75:6466:6c61:7265, 172.64.80.1
Connecting to codewithmosh.com (codewithmosh.com)|2606:4700:130:436c:6f75:6466:6c61:7265|:443... failed: Connection refused.
Connecting to codewithmosh.com (codewithmosh.com)|172.64.80.1|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codewithmosh.com/courses/1120640 [following]
--2021-12-08 19:37:35-- https://codewithmosh.com/courses/1120640
Reusing existing connection to codewithmosh.com:443.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://codewithmosh.com/p/the-ultimate-git-course [following]
--2021-12-08 19:37:35-- https://codewithmosh.com/p/the-ultimate-git-course
Reusing existing connection to codewithmosh.com:443.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: codewithmosh.com/courses/enrolled/1120640.html'
codewithmosh.com/co [ <=> ] 135.06K --.-KB/s in 0.03s
Last-modified header missing -- time-stamps turned off.
2021-12-08 19:37:36 (4.24 MB/s) - codewithmosh.com/courses/enrolled/1120640.html' saved [138304]
FINISHED --2021-12-08 19:37:36--
Total wall clock time: 2.3sIs this even possible, with needing to login?
Or is there a better way?
I've no real idea what I need to do for this, but I've cobbled this together from the man pages, and it downloads an html file. But when I double-click it, I still have to login and that takes me to the actual online course.
Code:sudo wget -r --mirror --convert-links --adjust-extension --page-requisites --no-parent --user=username --password="password" -e robots=off -U Mozilla https://<course-url>Here's the output:
Code:--2021-12-08 19:37:33-- https://codewithmosh.com/courses/enrolled/1120640
Resolving codewithmosh.com (codewithmosh.com)... 2606:4700:130:436c:6f75:6466:6c61:7265, 172.64.80.1
Connecting to codewithmosh.com (codewithmosh.com)|2606:4700:130:436c:6f75:6466:6c61:7265|:443... failed: Connection refused.
Connecting to codewithmosh.com (codewithmosh.com)|172.64.80.1|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codewithmosh.com/courses/1120640 [following]
--2021-12-08 19:37:35-- https://codewithmosh.com/courses/1120640
Reusing existing connection to codewithmosh.com:443.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://codewithmosh.com/p/the-ultimate-git-course [following]
--2021-12-08 19:37:35-- https://codewithmosh.com/p/the-ultimate-git-course
Reusing existing connection to codewithmosh.com:443.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: codewithmosh.com/courses/enrolled/1120640.html'
codewithmosh.com/co [ <=> ] 135.06K --.-KB/s in 0.03s
Last-modified header missing -- time-stamps turned off.
2021-12-08 19:37:36 (4.24 MB/s) - codewithmosh.com/courses/enrolled/1120640.html' saved [138304]
FINISHED --2021-12-08 19:37:36--
Total wall clock time: 2.3sIs this even possible, with needing to login?
Or is there a better way?