omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Soundcloud Downloader

    Pythonista
    16
    18
    14124
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • pudquick51
      pudquick51 last edited by

      Yup, decided to do another one - mostly because it was interesting and this one <b>definitely</b> wasn't going to be available in app form.

      As before with my other downloader, this particular script relies on the free 'iDownloads PLUS - Download Manager!' app in the app store (though it can be retooled to use other downloaders, provided they have a custom URL for launching the download URL in the app). I just happen to like this one because it's free and offers background downloads and 'Open In' functionality to move files afterwards.

      http://gist.github.com/pudquick/5394702

      Usage is with the bookmark listed at the bottom of the gist.

      Visit a page in Safari on Soundcloud (m.soundcloud.com) on your iOS device, find one with a song you like, then click on the bookmark to trigger a download of the .mp3 (even if the page does not offer a direct download link itself).

      Unfortunately the limitations of iOS make it so that .mp3 files you download can't be added to your device's music library programmatically. You'll have to save the .mp3 file from your device to iTunes and then sync it back to your device (or have a separate music player app, of which there are many, that you can 'Open In' the .mp3 file). In the meantime, iDownloads also offers a built-in media player so you can get to the listening :)

      <strike>There's an issue at the moment where the script takes a long delay in attempting to get a client id for the download. I'm not quite sure why it's doing that. When I was testing the script on my MBP, I didn't experience delays even remotely similar. I'll work on that more later when I get a chance and hopefully eliminate the delay.</strike>

      1 Reply Last reply Reply Quote 1
      • pudquick51
        pudquick51 last edited by

        <b>Update:</b> Figured out what the problem was! It was a slowness in the engine for converting the text response of an HTTP request. On a desktop machine, it's relatively quick (requests.get('http://something').text), but on an iOS device it's too much.

        So I forced the CDN to offer up the uncompressed javascript and just directly access the bytes in the response as a string with .content instead of .text. Works great!

        Now song downloads are almost instantaneous! 😄

        1 Reply Last reply Reply Quote 0
        • eliskan175
          eliskan175 last edited by

          You sir are a god among programmers.

          1 Reply Last reply Reply Quote 0
          • rustywild245
            rustywild245 last edited by

            work for me, thanx!!!

            1 Reply Last reply Reply Quote 0
            • DKatz225
              DKatz225 last edited by

              I'm having trouble getting this to work for some reason. I get an 'invalid syntax' error on line 16 where all the header info is. Any idea what could be causing this?

              1 Reply Last reply Reply Quote 0
              • Dalorbi39
                Dalorbi39 last edited by

                @pudquick, you've done it again

                1 Reply Last reply Reply Quote 0
                • midimuso
                  midimuso last edited by

                  There was an error message while trying this script -
                  Line 20 Index Error:List index out of range.
                  The original script refers to this URL in line 20
                  m-a.sndcdn.com
                  But when I looked at the source code for the mp3 I was trying to download
                  I see that it is
                  m-a-tb.sndcdn.com
                  So I updated the Script with this new URL, in 2 places
                  line 20
                  line 24
                  and tried again , this time it launched the iDownloads+ App
                  and Downloaded OK.
                  ..................................
                  20 the_js = find_xtsite_js.rsplit('m-a-tb.sndcdn.com',1)[1].split('"',1)[0].split('/')[-1]
                  21 print " .. getting client_id .. "
                  22 new_headers = {'Accept-Encoding': 'identity', 'Connection': 'close'}
                  23 sess.headers.update(new_headers)
                  24 find_client_id = sess.get('http://m-a-tb.sndcdn.com/' + the_js)

                  1 Reply Last reply Reply Quote 0
                  • violetviana6596
                    violetviana6596 last edited by

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • av2006
                      av2006 last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • Narendhiran24
                        Narendhiran24 last edited by

                        This post is deleted!
                        1 Reply Last reply Reply Quote 0
                        • jackwalesthetvl
                          jackwalesthetvl last edited by

                          Thanks for the useful information. It help a lot.

                          1 Reply Last reply Reply Quote 0
                          • devacharya55
                            devacharya55 last edited by devacharya55

                            Seeing something like this for the first time
                            Never knew that the content from SoundCloud can be downloaded! This is surely an eye opener.

                            1 Reply Last reply Reply Quote 0
                            • devacharya55
                              devacharya55 last edited by

                              You can use extension to download from sound cloud.

                              1 Reply Last reply Reply Quote 0
                              • adamdevine
                                adamdevine last edited by

                                Thanks for the inforation.

                                1 Reply Last reply Reply Quote 0
                                • westernira
                                  westernira last edited by westernira

                                  Thanks for this information. It really helpful for me. Also if you face any connectivity trouble while downloading you may refer router login guide. It's useful.

                                  1 Reply Last reply Reply Quote 0
                                  • Peter Campbell
                                    Peter Campbell last edited by

                                    This post is deleted!
                                    1 Reply Last reply Reply Quote 0
                                    • Blackshady
                                      Blackshady last edited by

                                      This post is deleted!
                                      1 Reply Last reply Reply Quote 0
                                      • briandua
                                        briandua last edited by

                                        This post is deleted!
                                        1 Reply Last reply Reply Quote 0
                                        • First post
                                          Last post
                                        Powered by NodeBB Forums | Contributors