Downloading Multiple Videos using FOR Loop
Scenario:
I watch computer based on-line tutorials via a site that uses ASP that allows downloading of their content. When I login and I look at the cookie, I can see that is uses a "AspSessionIdCopy" and a value" "325434f6-57b2-4b65-8374-blahblahblah" When I am looking at each video of the course that I am watching I can see that the link is the same with only the number incrementing such as: Code:
http://www.website.com/home/Player.aspx?lpk4=108148&playChapter=False Code:
#!/bin/bash Code:
wget -c username:password@http://www.website.com/home/Player.aspx?lpk4=10814$a&playChapter=False adding to cookies.txt: Code:
"AspSessionIdCopy 325434f6-57b2-4b65-8374-37ca1ec6ad9f" Code:
#!/bin/bash or maybe: Code:
wget --post-data="username=artiomix&pwd=yourpassword" --cookies=on --keep-session-cookies --save-cookies=cookie.txt "http://www.website.com/member.aspx" Code:
wget --referer="http://www.website.com/members.aspx" --cookies=on --keep-session-cookies --load-cookies=cookie.txt http://www.website.com/home/Player.aspx?lpk4=108148&playChapter=False |
In the past I have done something like:
Code:
useragent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1" |
For embedded vars, you should use {} to enable the parser to recognise it
Code:
...10814${a}&playChapter... |
Many thanks for all the replies. I will give this a shot tonight and give you some feedback soon.
|
All times are GMT -5. The time now is 06:26 PM. |