automated downloads

Hmm… I’ve set-up a script to automatically download a TV show about a year ago and just remembered it…

Apparently 1 year of this show is 167 Gbyte…

For completeness the download script – ignore my bad scripting:


# parameter 1: month
# parameter 2: from day
# parameter 3: to day
# parameter 4: year

# data -dmonday +%d

next_monday=$(date -dmonday +%d)
next_monday_month=$(date -dmonday +%m)
next_monday_year=$(date -dmonday +%y)

previous_monday=$(date -d'monday-7 days' +%d)
previous_monday_month=$(date -d'monday-7 days' +%m)
previous_monday_year=$(date -d'monday-7 days' +%y)

next_friday=$(date -dfriday +%d)
next_friday_month=$(date -dfriday +%m)
next_friday_year=$(date -dfriday +%y)

previous_friday=$(date -d'friday-7 days' +%d)
previous_friday_month=$(date -d'friday-7 days' +%m)
previous_friday_year=$(date -d'friday-7 days' +%y)

for i in `seq 1 7`;
        day=$(date -d'today+'$i' days' +%d)
        month=$(date -d'today+'$i' days' +%m)
        year=$(date -d'today+'$i' days' +%y)
        wget -c ""$year"/"$month"/"$year$month$day"_sendung_dku/1/"$year$month$day"_sendung_dku_3328k_p36v14.mp4"