wget abd block

Discussion in 'Ruby' started by Yerlan Kusainov, Aug 14, 2010.

  1. Hello. I'm want write a script, which download all the podcast from
    rss-feed.
    This is code, not work:
    def wget
    @mp3_links.each do |m|
    system("wget", "#{m}")
    end
    end
    I understand that to be linked to the delay, but how?
    --
    Posted via http://www.ruby-forum.com/.
    Yerlan Kusainov, Aug 14, 2010
    #1
    1. Advertising

  2. On Saturday, August 14, 2010 09:16:29 am Yerlan Kusainov wrote:
    > Hello. I'm want write a script, which download all the podcast from
    > rss-feed.


    Try bashpodder:

    http://lincgeek.org/bashpodder/

    > This is code, not work:
    > def wget
    > @mp3_links.each do |m|
    > system("wget", "#{m}")
    > end
    > end


    A nit: Why would you do "#{m}"? If m is already a string, just use it by
    itself:

    system 'wget', m

    If it's not, you could do to_s, but system probably already knows to do that.

    > I understand that to be linked to the delay, but how?


    What delay? I'm not sure what you mean here...
    David Masover, Aug 14, 2010
    #2
    1. Advertising

  3. thx for the reply, i finished write the script.
    You're right, it was necessary to write only system("wget ",m)
    --
    Posted via http://www.ruby-forum.com/.
    Yerlan Kusainov, Aug 15, 2010
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert P. J. Day
    Replies:
    2
    Views:
    389
    Robert P. J. Day
    Dec 16, 2004
  2. morrell
    Replies:
    1
    Views:
    948
    roy axenov
    Oct 10, 2006
  3. olivier HARO

    a simple wget in C language?

    olivier HARO, Oct 14, 2004, in forum: C Programming
    Replies:
    10
    Views:
    1,602
    Ilja Booij
    Nov 3, 2004
  4. Yang
    Replies:
    6
    Views:
    3,682
  5. smartwebcoder
    Replies:
    0
    Views:
    116
    smartwebcoder
    Jul 15, 2008
Loading...

Share This Page