Posted By

shapour on 03/02/13


Tagged

curl


Versions (?)

A baby for download movie from http://maktabkhooneh.org


 / Published in: Bash
 

get links from linkList file, that contain links like: http://maktabkhooneh.org/course?course=sharif-riazi2, then get all of course link on that page and save link of related video on that :D

Result is 'list' file that can interpreted with my another script :D

  1. for link in $(cat linkList)
  2. do
  3. curl $link > temp
  4. grep -o -e 'video?v=[A-Za-z0-9-]\{1,30\}-[0-9]\{1,5\}' temp > tempList
  5. echo $link >> list
  6. echo "===== $link ======"
  7. echo "==============================================" >> list
  8. for i in $(cat tempList)
  9. do
  10. echo "****** $i ******"
  11. curl "http://maktabkhooneh.org/$i" > temp
  12. grep -o -e 'http://takhtesefid.org/videos/[0-9]\{1,20\}.mp4?name=[A-Za-z0-9-]\{1,30\}-[0-9]\{1,5\}' temp >> list
  13. done
  14. echo "==============================================" >> list
  15. done

Report this snippet  

You need to login to post a comment.