Re: wget or curl and yousendit.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 10/13/2012 06:26 PM, Mark LaPierre wrote:

Here's a bit of a guide to build your own script.

# GET THE WEB PAGE
wget -q -O "rundown.php?prgId=2" "http://www.npr.org/templates/rundowns/rundown.php?prgId=2&prgDate=$DATE";

sleep 1

# NOW STRIP OUT THE URLs AND GET THE MP3 FILES
for URL in `grep "http://pd.npr.org/anon.npr-mp3/npr/atc"; "rundown.php?prgId=2" | sort | uniq | awk -F"\"" '{print $4}' | awk -F"?" '{print $1}'`
do
        wget $URL 2> /dev/null &
        sleep 1
done
Thank you Mark.

After looking into the source page containing all the links, and saw how the
URL of each file to download is constructed, I built and ran the following script
which worked like a charm.
PS: The first URL given to wget came to me in an email message sent to me by
yousendit.com because the uploader has me in his distribution list on yousendit.com.

#!/bin/bash
wget -c -O ysi.txt 'https://www.yousendit.com/dl?phi_action=app/orchestrateDownload&rurl=https........etc' grep 'directDownload?' ysi.txt | sed -e 's/.*directDownload?/https:\/\/www.yousendit.com\/directDownload?/' -e 's/=bas.*$/=bas/' | sort | uniq > urls # so that I can examine this file in case my sed script has an error
while read url; do
wget -c -ndH "$url"
done < urls

Thanx for the inspiration Mark.



--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux