Giter Site home page Giter Site logo

ckpod's Introduction

ckpod

$ ./ckpod.py --help
usage: ckpod.py [-h] [-c CONFDIR] [-d DOWNLOADS] [-r] [-v]

Another (hopefully less terrible) podcast downloader

optional arguments:
  -h, --help            show this help message and exit
  -c CONFDIR, --confdir CONFDIR path of the configuration directory (default: ~/.ckpod)
  -d DOWNLOADS, --downloads DOWNLOADS number of simultaneous downloads (default: 4)
  -r, --refresh         refresh episode list only (default: False)
  -v, --verbose         increase verbosity (default: 0)

One key feature of ckpod is the ability to regex transform the download filename. A couple of examples:

[go_on_air]
url = https://www.thisisdistorted.com/repository/xml/GiuseppeOttaviani1430216693.xml
# using @ as the delimiter because i'm using / and , in the pattern
# transform from
# http://audio.thisisdistorted.com/repository/audio/episodes/Giuseppe_Ottaviani_presents_GO_On_Air_Episode_229-1484302984297800712-MjM1NDgtNTk5MDY5OTk=.m4a
# to
# Giuseppe_Ottaviani_presents_GO_On_Air_Episode_229.m4a
sed = s@^(.*/)((.+?)(-[0-9]{16,})?-.{20}(.{12})?)[.]@\3.@

Or

[war_college]
url = https://rss.acast.com/warcollege
# transform from
# https://media.acast.com/warcollege/howthemilitaryis-quietly-defyingtrumpbybattlingclimatechange/media.mp3
# to
# howthemilitaryis-quietly-defyingtrumpbybattlingclimatechange.mp3
sed = s,^.+/([^/]+)/media([.]\w+)$,\1\2,

To-Do

  • handle redirects. Some pods redirect through a couple of GUIDs until finally ending up at a sane filename. possibly HEAD the media url during RSS loading to probe the final filename? maybe add a new keyword? requests.get will do that and the requests.Response.url will contain the final resolved URL. Unfortunately some of those URLs are a mess, which is why we have sed.
  • add some special formats for composing disk filenames, eg. date, episode title, ...
  • fetch-only mode. don't waste time reloading the feeds, just download missing episodes

ckpod's People

Contributors

ckuethe avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.