rg3/youtube-dl — pull request #4332 by jashandeep-sohi (2014-11-29 01:58:59+00:00)
Title: Added support for plugin/local extractors.

Currently, creating new extractors is a bit tedious for non developers.
You have to get the source, edit the package and then build it for your distro
(or possibly push the updates upstream). Although this centralized extractor
approach has it's upsides (e.g. more supported sites for everyone), sometimes
you just want to write an extractor quickly for local use.

I've added a system for writing plugin extractors and have them load at runtime.
Extractor classes are placed in .py files in
"$XDG_CONFIG_HOME/youtube-dl/extractors/" or "~/.config/youtube-dl/extractors".
At runtime these files are compiled and executed in an independent global
namespace. This global namespace is scanned for classes ending in "IE", which
are put in the 'youtube_dl.extractor' global namespace, init-ed and returned.

Plugin extractors are placed before regular extractors so that they have
precedence in case of overwrites.