- git clone https://gist.github.com/db05441b24fa16f3e0f3ddd2caa6e21e.git laravelpodcast
- cd laravelpodcast
- wget -i mp3_url_list.txt
- php rename.php
Last active
September 7, 2017 01:31
-
-
Save liuxd/db05441b24fa16f3e0f3ddd2caa6e21e to your computer and use it in GitHub Desktop.
[laravelpodcast] Download all mp3 files on http://www.laravelpodcast.com/episodes and rename them in right order.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://audio.simplecast.com/46453.mp3 | |
| http://audio.simplecast.com/42491.mp3 | |
| http://audio.simplecast.com/41169.mp3 | |
| http://audio.simplecast.com/38785.mp3 | |
| http://audio.simplecast.com/35051.mp3 | |
| http://audio.simplecast.com/32762.mp3 | |
| http://audio.simplecast.com/27610.mp3 | |
| http://audio.simplecast.com/25906.mp3 | |
| http://audio.simplecast.com/24121.mp3 | |
| http://audio.simplecast.com/22314.mp3 | |
| http://audio.simplecast.com/20182.mp3 | |
| http://audio.simplecast.com/19454.mp3 | |
| http://audio.simplecast.com/18397.mp3 | |
| http://audio.simplecast.com/17484.mp3 | |
| http://audio.simplecast.com/16291.mp3 | |
| http://audio.simplecast.com/15896.mp3 | |
| http://audio.simplecast.com/15117.mp3 | |
| http://audio.simplecast.com/14331.mp3 | |
| http://audio.simplecast.com/13327.mp3 | |
| http://audio.simplecast.com/12992.mp3 | |
| http://audio.simplecast.com/12660.mp3 | |
| http://audio.simplecast.com/11430.mp3 | |
| http://audio.simplecast.com/11108.mp3 | |
| http://audio.simplecast.com/10458.mp3 | |
| http://audio.simplecast.com/9718.mp3 | |
| http://audio.simplecast.com/9313.mp3 | |
| http://audio.simplecast.com/7372.mp3 | |
| http://audio.simplecast.com/6823.mp3 | |
| http://audio.simplecast.com/6262.mp3 | |
| http://audio.simplecast.com/6258.mp3 | |
| http://audio.simplecast.com/6257.mp3 | |
| http://audio.simplecast.com/6256.mp3 | |
| http://audio.simplecast.com/6255.mp3 | |
| http://audio.simplecast.com/6254.mp3 | |
| http://audio.simplecast.com/6253.mp3 | |
| http://audio.simplecast.com/6252.mp3 | |
| http://audio.simplecast.com/6251.mp3 | |
| http://audio.simplecast.com/6250.mp3 | |
| http://audio.simplecast.com/6249.mp3 | |
| http://audio.simplecast.com/6248.mp3 | |
| http://audio.simplecast.com/6247.mp3 | |
| http://audio.simplecast.com/6246.mp3 | |
| http://audio.simplecast.com/6245.mp3 | |
| http://audio.simplecast.com/6244.mp3 | |
| http://audio.simplecast.com/6243.mp3 | |
| http://audio.simplecast.com/6242.mp3 | |
| http://audio.simplecast.com/6241.mp3 | |
| http://audio.simplecast.com/6240.mp3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env php | |
| <?php | |
| $files = glob(__DIR__ . '/*.mp3'); | |
| $order = file('mp3.txt'); | |
| $order = array_reverse($order); | |
| foreach ($order as $k => $url) { | |
| $url = trim($url); | |
| $f = ltrim(parse_url($url)['path'], '/'); | |
| $n = str_pad($k + 1, 2, '0', STR_PAD_LEFT); | |
| echo $f, ' => ', $n , '.mp3' , PHP_EOL; | |
| rename($f, $n . '.mp3'); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment