How to extract an mp3's url from m3u playlist (and download the file)?

hello!
I've managed to get automator to retrieve (and save to hdd) an .m3u playlist from a radio's website that broadcasts a program I like in mp3.
inside this m3u playlist is the link an actual mp3... both the m3u and the mp3 change every week.
If I drag the m3u to TextEdit it opens up and I can see the 3 lines of "source code" of which the last line is the full url of the mp3 file (http://www.thatradiosurl.com/audio/shownumber.mp3)
My question is as follows: how do I get automator to 'extract' that url and save that file to my hard drive (so I can automatically add it to a playlist in itunes (and retrieve the show on my ipod at sync))??
I'll save the final workflow as an iCal event that will hopefully grab this show every week.
before you ask... no, that show is not available as a podcast! I wish it were... I think they're a bit slow on catching up with the tech.
thanks to all!
have a great day
d
pbg415"1.67   Mac OS X (10.4.6)  

Hi!
You might have seen this post in the Automator part
of the forum... but I might have posted it in the
wrong place (got no interest:( )
I've managed to get automator to retrieve (and save
to hdd) an .m3u playlist from a radio's website that
broadcasts a program I like in mp3.
inside this m3u playlist is the link to an actual mp3
file... both the m3u and the mp3 change every week.
If I drag the m3u to TextEdit it opens up and I can
see the 3 lines of "source code" of which the last
line is the full url of the mp3 file (http://www
.thatradiosurl.com/audio/show-shownumber.mp3)
You already got the playlist into a text file, you have two options:
1. use Automator's 'Get Link URLs from Webpages' action to extract the URL. 'Get Link URLs from Webpages' is under Safari lib.
2. run Automator Python script from 'Get Link URLs from Webpages' in AppleScript. The script below with get your mp3 URLs:
set playlist_file to "/path/to/playlist/file.txt" -- change to your actual playlist file path
set _URLs to do shell script "/System/Library/Automator/Get\\ Link\\ URLs\\ from\\ Webpages.action/Contents/Resources/links file://" & quoted form of playlist_file
set mp3_URLs to ""
repeat with _URL in paragraphs of _URLs
if _URL contains ".mp3" then set mp3_URLs to mp3_URLs & _URL & (ASCII character 10)
end repeat
mp3_URLs is the list you want you extract.

Similar Messages

  • Upload and download the file same name but different extension from the document library.

    HI,
         I am using the Client Object Model (Copy. Asmx ) To upload and download the file from the document library.
    I am having the mandatory File ID for the each Document.
    I tried to upload the the document (KIF53.txt) with File ID (KIF53) uploaded successfully.
    Again I tried to Upload the document(KIF53.docx) With File ID(KIF53) its uploaded the file but it not upload the File ID in the Column
    Please find the below screen shoot for the reference.

    thanks ashish
    tried 
    My requirement is to create the  folder and sub folder in SharePoint document library. If already exist leave it or create the new folder and the subfolder in the Document library using client side object model
    I able to check for the parent folder.
    But cant able to check the subfolder in the document library.
    How to check for  the sub folder in the document library?
    Here is the code for the folder IsFolder alredy Exist.
    private string IsFolderExist(string InputFolderName)
            string retStatus
    = false.ToString();
            try
                ClientContext context
    = newClientContext(Convert.ToString(ConfigurationManager.AppSettings["DocumentLibraryLink"]));
    context.Credentials = CredentialCache.DefaultCredentials;
                List list
    = context.Web.Lists.GetByTitle(Convert.ToString(ConfigurationManager.AppSettings["DocumentLibraryName"]));
                FieldCollection fields
    = list.Fields;
                CamlQuery camlQueryForItem
    = new CamlQuery();
    camlQueryForItem.ViewXml = string.Format(@"<View 
    Scope='RecursiveAll'>
    <Query>
                          <Where>
    <Eq>
    <FieldRef Name='FileDirRef'/>
    <Value Type='Text'>{0}</Value>
                            </Eq>
    </Where>
    </Query>
    </View>", @"/sites/test/hcl/"
    + InputFolderName);
    Microsoft.SharePoint.Client.ListItemCollection listItems
    = list.GetItems(camlQueryForItem);
    context.Load(listItems);
    context.ExecuteQuery();
                if (listItems.Count
    > 0)
    retStatus = true.ToString();
                else
    retStatus = false.ToString();
            catch (Exception ex)
    retStatus = "X02";
            return retStatus;
    thanks
    Sundhar 

  • I had to redownload cs6 from another drive and all the files are there but it wont open any of it

    i had to redownload cs6 from another drive and all the files are there but it wont open any of it

    Copying/transferring will not work.  You need to install the software using installation files.
    CS6 - http://helpx.adobe.com/x-productkb/policy-pricing/cs6-product-downloads.html

  • If I add a .mp3 - Do Visitor need QT Pro to download the file?

    This is actually the question.
    I create a page where visitors should be able, to
    1. listen direct to the file (solved this adding a flashplayer)
    2. subsuscribe to a podcast (solved with lemonz dream podcast maker) and last
    3. Download the file direct
    so, if Visitors want to do point 3. Do they need the ProVersion? Do I have to make a .zip and add this also to the side.
    Thanks Martin

    Create a link to the MP3 and tell the vistors to save the file. Add the words +Right-click to save+.
    Or create a zip file and link to it. Clicking the link will usually download the zip file. Hopefuly they know how to unzip it.
    Or ignore these solutions and just tell them to subscribe to your podcast.

  • HT1657 My movie -- safe House -- froze/stopped with 57 minutes left to play. How can I get the rest of the movie to play or how can I delete it from my iPad and download the rental again?

    My rental movie -- Safe House -- stopped/froze with 57 minutes leftnto play. How can I watch the rest of the movie, or delete it to download it again?

    Welcome to the Apple community.
    Have you tried stopping the movie and trying to start it again.
    Unfortunately you cannot re-download rentals. If the problem continues, select the content which is causing a problem and use the 'Report a problem' button in Your Purchase History.

  • How to upload and Download the file in a system through java programing

    I am trying to upload a file as well as want to download the uploaded file in my system....I don't have any server an all.
    I want to implement this in my system only .
    I got this code but i don't know ,where i have to make the change and what are the parameters i have to pass.
    can any one help me on this code ....please
    here some piece of code
    File Upload and Download Code Example
    package com.resource.util;
    public class FileUpload
    public void upload( String ftpServer, String user, String password,
    String fileName, File source ) throws MalformedURLException,
    IOException
    if (ftpServer != null && fileName != null && source != null)
    StringBuffer sb = new StringBuffer( "ftp://" );
    // check for authentication else assume its anonymous access.
    if (user != null && password != null)
    sb.append( user );
    sb.append( ':' );
    sb.append( password );
    sb.append( '@' );
    sb.append( ftpServer );
    sb.append( '/' );
    sb.append( fileName );
    * type ==> a=ASCII mode, i=image (binary) mode, d= file directory
    * listing
    sb.append( ";type=i" );
    BufferedInputStream bis = null;
    BufferedOutputStream bos = null;
    try
    URL url = new URL( sb.toString() );
    URLConnection urlc = url.openConnection();
    bos = new BufferedOutputStream( urlc.getOutputStream() );
    bis = new BufferedInputStream( new FileInputStream( source ) );
    int i;
    // read byte by byte until end of stream
    while ((i = bis.read()) != -1)
    bos.write( i );
    finally
    if (bis != null)
    try
    bis.close();
    catch (IOException ioe)
    ioe.printStackTrace();
    if (bos != null)
    try
    bos.close();
    catch (IOException ioe)
    ioe.printStackTrace();
    else
    System.out.println( "Input not available." );
    }

    At least that is what the code you posted suggests to me.It looks like that to me too.
    I believe that
    URLConnection urlc = url.openConnection(url);Will return you an FTP URLConnection implementation if you pass it a ftp:// url
    So for simple FTP ops, you don't need any external libs.
    Actually, looking at your code, this is already what you are doing, so I really don't get this:
    am not using FTP server..... i want to implement in my system only ....So How i will do.
    Can you give me any idea based on this code Can you explain a bit more what you need?
    patumaire

  • When I export a AAF file from Protools 9 and Import the file into Logic ProX the drum track is out of sync.  I created the drum loop using NI Maschine.  Has anyone else seem this??

    When I export an AAF file/project from Protools 9 using an external drive and import the AAF into Logice Pro X the drum track does not play correctly.  It is out of sync with the rest of the track.  I created the drum loop as a plugin using Native Instruments Maschine. Has anyone else had this problem??  Also how would I go about exporting the midi tracks from the Protools session.  The midi track does not show when the file is imported to Logic Pro X.  The midi data should export with the AAF file correct??

    Are you using any plugins in Logic?
    In Preferences/Audio  under the General tab, how do you have the plug-in-latency compensation set?

  • [SOLVED] How do I play .mp3 in mocp by clicking on it in the file mgr?

    I'm running Openbox and PCmanFM.
    I'm using Sakura as my terminal.
    I've set up a ~/.local/share/applications/mocp-usercreated-0.desktop as:
    [Desktop Entry]
    Encoding=UTF-8
    Name=mocp
    Exec=/usr/bin/sakura -e '/usr/bin/mocp -T white_on_black'
    MimeType=audio/mpeg
    Icon=exec
    NoDisplay=true
    and my ~/.local/share/applications/defaults.list is:
    [Default Applications]
    audio/mpeg=mocp-usercreated-0.desktop
    but when I open PCmanFM, navigate to my Music directory and click on any .mp3 file it doesn't work.
    Can anyone tell me what I need to do?
    Last edited by PingPing (2009-10-30 19:55:41)

    Thanks Liquid.  What you suggested didn't quite work but it got me thinking.
    I took what you suggested, played around with it and eventually solved the problem with the following mocp-single.sh script:
    #!/bin/sh
    /usr/bin/mocp -cap $1 & /usr/bin/sakura -e '/usr/bin/mocp && killall mocp'

  • How to install printer in windows 7 from print server without downloading the driver access denied

    Hi dears,<o:p></o:p>
    i am trying
    to install printer driver which is installed in win server 2003 into win 7, but
    after connecting it says access denied, looks like the win 7 does not have a
    power user to install the driver.<o:p></o:p>
    now the IT
    in charge do not want to change the GP in the domain (win 2008 R2) and he want
    the printer driver to be installed without the it involvements.<o:p></o:p>
    as i can
    see only thru GP in the DC you can do this, am i correct??<o:p></o:p>

    You are looking for this information
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/dc4fcf93-8268-44f4-822a-d463d9443f6c/windows-7-and-server-2003-printer-server-issues?forum=winserverprint
    Alan Morris Windows Printing Team

  • When I download a file it slows and I have to force quit just to reopen and download the file. How do I stop this?

    It started when I was downloading PDFs then it moved to any kind of folder. It doesn't freeze it just doesn't load for 10 mins. I have to force quit and try again. Sometimes it fixes it but other times it doesn't. This has been happening since i upgraded my mac to the Firefox 6.0.2

    Where are you creating folders -- inside your home folder, or outside it?

  • Extracting object from a picture and erase the background

    Whats the best tool or way to extract an object, or person from a picture and earse the backgroung. Then puting it into illustrator? How do i save it to where theirs no background and only the picture that i selected?

    There is no "best tool". It depends entirely on the image and the talent of the person using the tool (or more likely technique).
    But you may wish to spend some time studying the Pen tool.
    Also, knowing your version of Photoshop would also help those who wish to help you.
    You topic title would also make a great Google search. :)

  • Download the file from oracle throuth jsp

    hello
    i have a problem that how to read the long raw data from oracle, and download the files( include images or word or txt files and so on). i don't want to read them is ie .i hope can realize the function that each file have a name appeared in ie .they are downloaded only we click the name. who can tell me .thank u

    you say you don't want to, so just don't :)
    Start by learning the use of proper punctuation, grammar and spelling and use that knowledge to learn how to properly word a question so others can understand what you are asking.
    Then come back and ask your question using that new knowledge.

  • How to download the file in as3.0

    hi
    in as3.0 click the button and download the file in the local path folder.
    how to write the code in as3.0. help me
    thks

    Search Google for a tutorial using terms like "AS3 FileReference download tutorial"
    Here is a link for that search...
    http://www.google.com/search?q=AS3+FileReference+download+tutorial&rls=com.microsoft:en-us &ie=UTF-8&oe=UTF-8&startIndex=&startPage=1&rlz=1I7GGNI_en

  • How to Extract Customized Financial Statement Version from R/3 to BW

    Hi Gurus,
    Could anybody tell me how to Extract Customized Financial Statement Version from R/3 to BW. Also send me docs on FICO and COPA extraction from R/3 to BW.
    Thanks in advance...
    Regards
    Rafi

    Sayed
    Please see this BW Best Practice link
    http://help.sap.com/bp_biv133/
    http://help.sap.com/bp_biv235/BI_EN/html/BW/COPABaselineAnal.htm
    http://help.sap.com/bp_biv235/BI_EN/html/BW/ControllingAnalysis.htm
    COPA Business content
    http://help.sap.com/saphelp_nw04/helpdata/en/28/3dc7393b26da1de10000000a114084/content.htm
    Hope this helps
    Thnaks
    Sat

  • How do I extract email from a form and send the PDF to that user?

    How do I extract email from a form and send the PDF to that user?

    here you can add email to send to, CC, Subject, and body message
    var oDoc = event.target;
                        oDoc.mailDoc({
                                                                bUI: false,
                                                                cTo: "Agency Contact Email",
                                                                cCC: "",
                                                                cSubject: "Write your title here,
                                                                cMsg: "Dear" + AgencyContact + "(" + AgencyContactEmail + ")\nThe student, " + FirstName + " " + LastName + " has applied to work at your agency. Please confirm they can work here blah blah blah.......\n\nThanks.\n\nrespectuflly,\n\nme"

Maybe you are looking for

  • Get filename from file sender adapter

    Hi Experts, I have a question regarding the file/ftp adapter (sender). I have a directory with xml and pdf files. for every xml file there is a pdf file with the same filename. for example: file1.xml file1.pdf file2.xml file2.pdf file3.xml file3.pdf

  • N97 and N85 Camera mechanism malfunction from magn...

    Hello all, I'm new here and the reason that registered is to tell to you about thing that i discovered yesterday. So if you have N97 and use a pouch to carry it on your belt, you may be aware that in case the pouch closed by the built-in magnets, the

  • BDC error when processing KP26 in background

    Hi friends, do you know why I get error 'no batch input data for screen SAPLSPO4 0300' when processing the BDC job in background?  It should only flow through the following two screens SAPLKPP0 1000 and SAPLKPP2 0110, which runs successfully in foreg

  • Updating iPod from iTunes sporadically causes system reboot

    This one is driving me slowly crazy, so help is appreciated. I'm running version 6.0.4.2 of iTunes and iPod updater 2006-03-23 on a Windows XP Media Center PC with a 20 gig iPod Photo. Have been blissfully using iPod and iTunes for months with zero i

  • Acrobat CS6

    Bonsoir, J'ai, depuis un certazin temps , installé Adobe Master Collection CS6 dont j'utilise, essentiellement: PhotoShop > Illustrator > InDesgn,   mais... ayant besoin de Acrobat, je constate, avec surprises, que Acrobat n'est pas dans le dossier e