Created
December 3, 2016 10:30
-
-
Save Busata/982f7e3cda85089925b7a6b6db753a8f to your computer and use it in GitHub Desktop.
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
class PlaylistParser: | |
_strategy = {"audio/x-scpls": PlaylistParserPLS(), | |
"application/pls+xml": PlaylistParserPLS(), | |
"audio/mpegurl": PlaylistParserM3U(), | |
"audio/x-mpegurl": PlaylistParserM3U(), | |
"application/xspf+xml": PlaylistParserXSPF() | |
} | |
def parse(self, mime, data): | |
self.data = data | |
return self._stragegy[mime].parse() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment