Unsupported Workflow
TL;DR Use selenium+firefox to download mp3 and make them accessible via RSS…
I wanted to listen to an audio book…
§1. Webpage player
Worked fine, but no player controls (fast forward and rewind).
§2. Inspector+wget
Using chrome inspector, I can get the url to mp3, but plain wget didn’t work. I guess some anti-crawling mechanism was implemented, so I resorted to selenium. Since I had some experience on browser automation in a Ruby on Rails project, it seemed natural to start from there…
§3. selenium ruby binding
Very solid documentation; hello-world worked smoothly on the first try.
§4. selenium+chrome
Somehow, chrome always played the mp3 using its built-in player, instead of downloading it. I experimented with all kinds of options, but none worked… Then, I switched to firefox.
§5. selenium+firefox
The key config was media.play-stand-alone
, which controls if the built-in player should be used. One can experiment
toggling this option in firefox manually.
1 | require 'selenium-webdriver' |
Now, all mp3 were downloaded to my pc, but how to transfer them to my iphone?
§6. Dropbox
Dropdox was installed on both my pc and iphone, but there was no easy way to make the whole folder available offline, and no fast forward or rewind support in the built-in player. Since my experience with the Podcasts app on my iphone had been mostly positive, I contemplated distributing these mp3 using RSS…
§6. Anchor
I added Anchor to my bookmarks a while ago, but never had a chance to check it out. After some click-around, I realized that its support for batch uploading was poor. IOW, one can’t upload multiple episodes in one step. Further searching brought me to…
§7. dropcaster
Dropcaster can turn a folder of mp3 into something RSS accessible, which was exactly what I need. However, since dropbox dropped the support for relative path in public folder, I couldn’t use it for hosting. Well, all hopes were not lost yet…
§8. local http server
Since this was not meant to be accessible outside my LAN, a local http server should be enough:
1 | ruby -run -ehttpd . -p8000 |
Then add podcast by url, http://192.168.1.10:8000/index.rss
. Done.
§Summary
It was hell of a journey just to play some mp3 on my iphone. No one else but me to blame for choosing the unsupported workflow.