ohoachuck / wwdc-downloader

WWDC 2019 video downloader script written in Swift - no external dependency.
http://blog.hoachuck.biz
1.49k stars 142 forks source link

Can not download WWDC2013 videos? #34

Open ishell opened 9 years ago

ishell commented 9 years ago

Hi , I want to download WWDC2013-405 video and url is https://developer.apple.com/videos/play/wwdc2013-405/, and I try ./wwdcVideoPDFGet-curlVersion.sh -y 2013 -s 405 on iTerm2, it return this :

Using 'no password' mode (this is possible since WWDC 2014 sessions addition => Apple bug ?)!
try using -l option if download does not work.

sed: /tmp/wwdc-session-8E67B4C3-3AD8-48C4-B949-0D1C51E189D0.tmp/titles.txt: No such file or directory
./wwdcVideoPDFGet-curlVersion.sh: line 46: /tmp/wwdc-session-8E67B4C3-3AD8-48C4-B949-0D1C51E189D0.tmp/titles.txt: No such file or directory
******* DOWNLOADING PDF FILES ********
******* DOWNLOADING SD VIDEOS ********

It just create a folder on my local disk.Then I type ./wwdcVideoPDFGet-curlVersion.sh -y 2013 -s 405 -l my@email.com

it turn out this:

Password:
sed: /tmp/wwdc-session-30B909D2-6D8E-481B-A83F-44E6EDC31178.tmp/titles.txt: No such file or directory
./wwdcVideoPDFGet-curlVersion.sh: line 46: /tmp/wwdc-session-30B909D2-6D8E-481B-A83F-44E6EDC31178.tmp/titles.txt: No such file or directory
******* DOWNLOADING PDF FILES ********
******* DOWNLOADING SD VIDEOS ********

How to solve this ?

chandanankush commented 9 years ago

I am also facing same issue.. please suggest how to solve this..

mjzjohn commented 9 years ago

Got the same problem for all WWDC videos. A couple of days ago it still went well.

chandanankush commented 9 years ago

Here what i found in my analysis, Apple has changes it's website presentation for wwdc videos, So script is unable to fetch video url's..problem is somewhere parsing the video.html file near lines

    cat ${TMP_DIR}/video.html | sed -e '/class="thumbnail-title/,/<div class="error">/!d' > $TMP_DIR/video-cleaned.html
    --------
    cat ${TMP_DIR}/video-cleaned.html | while read line; do 
            sessionNum=`echo $line | grep -o -E '<li class="thumbnail-title">(.*)</li><li class="thumbnail-(id|play)">(.*)</li>' | grep -o -E 'Session [0-9]*' | cut -d' ' -f2`
            title_array[$sessionNum]=`echo $line | grep -o -E '<li class="thumbnail-title">(.*)</li><li class="thumbnail-(id|play)">(.*)</li>' | cut -d'>' -f2 | sed 's/<\/li$//g'`
            echo "$sessionNum,${title_array[$sessionNum]}" >> $TMP_DIR/titles.txt
        done
        `sed -n '/^,/!p' $TMP_DIR/titles.txt > $TMP_DIR/titles.txt.tmp && mv $TMP_DIR/titles.txt.tmp $TMP_DIR/titles.txt` 

it needs to parse correct html tag..